Remove utility/ dependencies on network.h and main.h

- Move basic functions that do not depend on t_commrec from network.*
  to utility/basenetwork.h.  This allows removing network.h dependencies
  from utility/, as well as from other new C++ code.
- Simplify gmx_abort() somewhat.  It is only called with real MPI, so
  remove other code paths, and make it a linker error if it is called
  under other circumstances.
- Move gmx_gethostname() from main.* to basenetwork.*.
- While at it, remove unnecessary includes for main.h, now that it only
  contains a few functions.

Change-Id: I048e48ba81b5e764e8342ee07a05201da5fbade2