Refactored calling the Mapserver cleanup function

Moved `msCleanup()` from `Node::AtExit()` to `atexit()`: the cleanup
has no use for the presence of the V8 VM and `AtExit()` was
occassionally not being called for some reason.  This works around
that problem.

`msCleanup()` is also now called when the process receives a standard
set of TERM signals.  Importantly this ensures that `MS_ERRORFILE` is
properly closed and flushed in a broader variety of situations.