Remove unused variables.
Remove unnecessary macros.

* MAX can be replaced by fmax.
* SIGN can be replaced by copysign.
* PYTHAG can be replaced by hypot.

The last two require C99, but since we require Fortran2003, I don't
think that's a big deal.
Use proper C indexing.

No more of this pseudo-Fortran indexing. It's odd and causes unnecessary
work (to be fixed).
Remove unnecessary allocations and loops.
Add missing header.

ctype.h is required for isspace.
Use MPI_STATUS_IGNORE in MPI calls.

The status is not used, so this saves us an extra variable or two.
Fix some simple type-conversion warnings.