Make mongo wait for operations to complete before closing

There was a bug with load.js ending before all things had successfully persisted to mongo.  We must make sure that all mongo operations have completed before exiting from load.js.

MongoClient.close() just interrupts current operations, so we cannot rely on that, but instead have to keep track of if there is an operation in flight before closing.  This change introduces a request counting mechanism to mongoClient and adjusts everything to use it.
Merge pull request #12 from tidepool-org/cheddar/persist-before-close

Make mongo wait for operations to complete before closing