Move gmx_fatal.* to utility/fatalerror.*

One more included-by-all header to utility/.
Mainly mechanical replacement of include paths, some reordering in C++
files.  Minor clean-up in the moved files.
gmx_fatal_collective.h not moved at this point, as it is unclear whether
it should go here, or somewhere else (utility/ should not depend on
t_commrec...).

Now, it's mainly types/simple.h that prevents removing some module-level
dependencies to legacyheaders/.  Finding a good location for that (or
its contents, if it needs to be split), and reorganizing the code a bit
more should now allow really putting utility/ at the bottom of the
dependency stack where it belongs.

Part of #1415.

Change-Id: I6e487566d5bd7c9ec7a1455a2d31bd6d645bada3
Version bump for post-5.0 development

Change-Id: I6be353c112669216c39da441d58d1d10976b3b63
Remove some utility -> legacyheaders dependencies

- Use methods in programcontext.h and baseversion.h instead of
  copyrite.h within utility/.
- Replace one use of asize() with an alternative implementation that
  doesn't require an explicit array size.
- Don't pass the whole hw_opt structure to the OpenMP thread affinity
  check, when only a single field is ever accessed.
- Don't call md_print_warn() from gmx_omp_check_thread_affinity(), but
  provide the message to the caller so that they can print it.

For the last two, the rationale is that if this function needs to be in
a generic OpenMP wrapper (which makes sense, since it requires in-depth
information about the actual OpenMP library), then it shouldn't depend
on any mdrun-specific code.

Change-Id: Icc8f4026e4a2ce8e5d533a5bb88e5f3dddcc9a4a
Fixed MG typo in residuetypes.dat

Corrected "MK" typo to "MG" so that magnesium is recognized.

Change-Id: Ia4e76028e40ffd849eb0155ce5bac2996472cef6
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
Re-use gmx_within_tol from math/utilities instead of is_equal

Change-Id: I097bc4901c2f0123cdcb101c9d2f75f1485fb771
Move part of types/simple.h to utility/

- Move those parts of types/simple.h that are wrapping C99 features and
  some compiler-specific attributes (gmx_unused) into
  utility/basedefinitions.h.
- Replace some uses of types/simple.h with the new header, removing a
  few module-level dependencies on legacyheaders/
- For now, types/simple.h includes the new header to avoid touching a
  lot of code.
- Remove unused BIG_STRLEN from types/simple.h.
- Move XXXX etc. into calcvir.c, which is the only place where they are
  used.

Change-Id: Idad2aff77048cc1487945e90c8b50ff8bd7010d4
Clean up and fix issues in doc-check scripts

- Some 'documentation' -> 'doc' replacements in method names to make
  lines shorter and to make method names more consistent.
- Make the checker work for members of anonymous namespaces.
- To achieve the above, add minimal modeling of namespaces and members
  to gmxtree.py, and model the parent compounds of members better in
  doxygenxml.py.
- Make the checker check also documentation that is ignored by Doxygen.
  This is now possible when anonymouns namespaces work.
  --check-ignored now only controls whether the ignored comments provoke
  a note or not.  This is not enabled currently, because it produces
  quite a lot of noise.
- Fix documentation issues in those ignored Doxygen comments (all the
  source code changes).
- Encapsulate some logic in gmxtree.py related to how the API type is
  handled in the case of legacy (undocumented) modules.  This simplifies
  the graph generation logic, and replaces a lot of the "legacy" edges
  with more descriptive edges: installed headers in legacy modules are
  now treated as public API headers.
- Add a basic legend to the module graph.

Change-Id: Ia4e83468548b361f37bdb8d35862e636d7abddd6
Fixed typo in manual README.

Fixes #1478

Change-Id: I0dc1cbcac90b4d40a805bfeaf38a90e478801ae0
Clean up futil.*

- Make is_pipe() static, since it is not used outside futil.cpp.
- Move gmx_fexist_master() to network.* to remove t_commrec dependency
  from futil.
- Remove unnecessary #define for a system-provided symbol rewind().
- Remove unused gmx_truncatefile().
- Move STRLEN to utility/cstringutil.h, since types/simple.h is no
  longer transitively included by futil.h.  This avoids reintroducing an
  utility/ -> types/simple.h dependency.  Include cstringutil.h in
  source files that were depending on STRLEN.
- Add some Doxygen documentation for all the functions.

Preparation for moving these to utility/ to resolve fileio-utility
cyclic dependency.

Change-Id: I26ed7e46c512ee41621e2a2c241692c1bb28530d
Remove utility -> fileio dependencies

- Move futil.* to utility/.  It is somewhat difficult to keep low-level
  utilities independent of any file utility functions.  Now fileio/
  mainly contains I/O routines that need to know something about the
  file formats supported by Gromacs, and lower-level stuff is in
  utility/.
- Move path.* back to utility/, with the same rationale as above.
- Don't use gmxfio for the debug file.  It doesn't provide any benefit
  for this use, but introduces a cyclic dependency that is very hard to
  break otherwise.  There are some extra conditionals in gmxfio that
  could possibly be removed because of this, but left them there for
  now, since they require additional analysis.

Now, the only dependency from utility/ to other subdirectories is
because of gmx_fatal_collective().

Change-Id: Ib5b8e71088f1fa69909179b35f9600e22ef9ad8d
Remove unused shift.h

Wasn't included from anywhere, and the one declared function isn't
implemented anywhere.

Change-Id: Ib7548bdfe4f02e34a5c4c62b370c4a7071c3653a
Beer + table soccer = quote!

Change-Id: I3323f5b7ae7c65013dc8c0270232f02da8a42bd5
Refactor gmx_fatal()

- Remove t_commrec and legacyheaders/ dependencies from
  utility/fatalerror.cpp by splitting gmx_fatal_collective() into a
  low-level helper (in fatalerror.cpp) and a high-level routine that
  knows t_commrec (in network.c).
- Move the declaration of gmx_fatal_collective to network.h to get rid
  of one more header in legacyheaders/.
- Refactor fatalerror.cpp such that the error handler is no longer
  responsible of terminating the program.  Split functionality into
  helper functions that can be called as appropriate, and remove a lot
  of duplication.
- Clean up gmx_abort() and code that calls it.
- Remove interactive prompt from the error handler exit path.

Change-Id: Ia0ab2e415a18bf6ed17bebd1fd8870946d16793e
Remove sysstuff.h includes from headers

Remove #include "sysstuff.h" from all headers, and replace it with
standard headers where necessary.  Add necessary standard headers to
source files that previously got them transitively from one of these.

Use snew() in gmx_spatial.c instead of a custom implementation.
Replace some free() with sfree().

Part of getting rid of sysstuff.h.

Change-Id: I857ba69c004aea16195e629c5bf69df32724b3fc
Remove sysstuff.h

Replace this with those standard headers that are actually necessary for
the source files.  There are likely several transitively covered header
dependencies now, but those can be resolved when they give problems.
One more header off from legacyheaders/.

Part of #1415.

Change-Id: I4cc3f0eec0f546dad929512e532d8efb11da3694
Clean up xvgr.h and viewit.h usage

- Remove unnecessary includes of these files.
- Include viewit.h in files that were covered transitively through
  xvgr.h, and remove the include from there.
- Remove other unnecessary includes in these headers.
- Make can_view() static in viewit.c, since it wasn't even declared in
  the header.

Change-Id: I7b6b3724a5b7fd40be46eb8fbcb9d9aeaccf9cc8
Move xvgr.* to fileio/

Part of #1415

Change-Id: Ib3d78bce62a4c03c4d72001164921edd556657a2
Fix typo in fatalerror.h

This was causing a warning from the Doxygen checker (doc-check).

Change-Id: I2a482856fd7b88db0d8e669bdb815f52db79e4f0
Remove unused minvert.h

This wasn't included from anywhere either (except one file in contrib/),
and none of the declared functions had implementation.

Change-Id: I8133c278303f651c9a324fd5ec60133e00c90cd8