build: Remove unnecessary creation/deletion of directories.
Remove todo list.

We just use GitHub issues now.
Remove unused C code.

Most of this comes from NR and should be replaced anyway.
Remove old comment about underscores.

The underscore situation should be detected by running ./configure.
Remove unnecessary math constants.

These are already defined in math.h.
Remove unnecessary #include statements.

For system headers, they basically do nothing but take up extra lines.
build: Fix rules for executables.

Since the exectuables were never mentioned by full path, they would be
rebuilt unconditionally.
build: Correct dependencies for module files.

Without the correct dependencies, parallel builds fail due to missing
modules.
Add scotch files to .gitignore.
build: Remove scotch from specfem2d Makefile.

It's only used in the mesher, and the search path was wrong when used
here anyway.
Move constant_Q2_sub functions closer to their use.

Also, move them away from the NR functions.
Use proper ANSI prototyping.
Fix calls to exit function.

Just placing the word exit there does nothing.
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.