jUnit external resources

Replaces some duplicated MongoDB connection setup and teardown in integration tests with jUnit `ExternalResource`s. Also cleans up the integration tests somewhat to remove dangling references to the MongoDB connection, which appear to be causing leftover test databases in MongoDB. Most integration tests now properly do cleanup.
Along with this, some additions had to be made to allow injecting the Mongo connection and turning of the StatusUpdater thread.

Moves the temporary directory used in the `ElasticsearchOutputStage`'s integration test to a real `tmp` directory, using jUnit `TemporaryFolder`.