Make gmx_node_num/rank safer
With real MPI, MPI_Init() is called as the first thing, but with
thread-MPI, MPI is "initialized" only much later, when the actual
threads are started. But code between these two points may expect to be
able to check whether the current rank is the master and/or whether
there are other ranks, and try to use these functions for that.
Previously, for thread-MPI builds, they accessed invalid memory and
returned essentially random values if called between these two init
points. Now they behave as if the single thread that is executing at
that time is the single master rank.
Also document the behavior in more detail.
Change-Id: Ia3bef9c5899c528e315fe1310bde970dfec68769