Adds shutdown hook and uncaught exception handler.

Added shutdown hook to Main. Running the shutdown method will terminate all thread started by Hydra. If a thread is hung, Hydra will be killed after 30 seconds

Added an uncaught exception handler that runs the shutdown method if an uncaught exception is thrown by Hydra

If an IOException is caught when trying to start hydra, the shutdown method is called instead of only shutting down the server.
Adds possibility to throw a ProcessingException after a configurable timeout, unless the document was processed. If processing times out and cannot be cancelled, the stage will trigger JVM shutdown.

Restructures tests for AbstractProcssStage.
Made Main implement a TerminationHandler. Removed all static modifiers in Main. Passed a refrence to main to NodeMaster that passes it to StageRunner

Updated tests to take a mock of TerminationHandler
Added a stage that gets stuck in an infinite loop and never returns. For example used for testing how your pipeline handles failing libraries that never returns

Added a stage that throws an uncaught runtime exception. Used to test how your pipeline handles unexpected runtime errors
JavaDoc and format cleanup

Cleans up structure and spelling

Removes unused imports

Removed template comments from ConcatenatingHashStage
Adds tests for execution timeouts.
Adds StageKiller to allow for tests that check if stages are killed.
Adds TODO about writing tests that check Stage kills.
Makes tests for AbstractProcessStage follow the same naming convention
Renames TerminationHandler for consistent naming. Adds note to InfiniteLoopStage to clarify that it can't be interrupted.
Merge pull request #264 from laserval/ssimon-process-threads

AbstractProcessStage timeouts and cleaner shutdown
Fixed concurrency issue in MemoryCache

Added synchronization on critical sections. This fixes #268