Fix dependencies on config.h for typedefs.h

The include in simple.h hid other dependencies and was only
used for gmx_inline and gmx_restrict. Defining those
in just one place simplifies it.

Also fix missing includes in public headers.
All public headers should be able to be compiled by themselfes
and shouldn't rely on other headers aready being included.

Also fixes that math module headers were installed to maths.

thread-mpi headers and commrec.h are not installed anymore.
The installed headers have no dependency on GMX_LIB_MPI and
GMX_THREAD_MPI anymore.

Change-Id: Ie1f26913739d3e42d653a51fa2c2d71e6ea3ef7a