Improve mongo logging, so we only log unexpected disconnects.

This cleans things up a bit so normal shutdown doesn't spew mongo
disconnect errors.
Improve logging during tests, so debug logs can be output to a file.

This is preferable for tests, so we don't have to always worry about
having quiet output and can better debug things during testing.