main catches and handles "std::exception" and "...", returning 1

Note: I added this after reading a blog post:

http://akrzemi1.wordpress.com/2011/10/05/using-stdterminate/

I'm not sure if this is accurate info, but after reading it this commit
seemed like a good idea, and I don't see that it could be harmful.
Seemed like a good idea to make a PR anyways though.

The purpose of this is so that even when we request the program
to be terminated with "throw 42", the exception will be guaranteed
to propogate back to main and all destructors will be called along
the way. This way, if the program requested a socket for example,
the socket will still be released when we terminate unexpectedly,
so it might be slightly more convenient for testing.