fixes leak of mongo client on shutdown, and makes monitor threads shutdown more graceful.
Merge pull request #3 from john-morales/bugfix/shutdown-behavior

Fixes to service shutdown and monitor thread behavior