Move memcheck functions to their own header.

There's no reason to dump all the prototypes into externs.h. Also
improve #include hygenie in affected .c files by using the following
order for #includes:
1) #include "config.h", "copyrite.h", and the corresponding .h file, if
   any, first.
2) Then include any system headers (e.g. <stddef.h>)
3) Finally, everything else, sorted in alphabetical order.

This forces headers to #include everything they depend on rather than on
depending on the .c files to randomly #include things in the right
order. It also helps enforce that the prototypes in the .h file match
the implementations in the .c files.

git-svn-id: https://pennmush.googlecode.com/svn/trunk@1772 ba372814-4f39-11de-9ad6-1127a62b9fcd