mongo: add JournalEnabled function

Utility function for detecting at runtime
whether the Mongo connected to has journaling
enabled.
state: only set Safe.J if journaling is enabled

Also, fix some error handling fallout in agent.
Merge pull request #416 from axw/mongo-journalenabled

Only set Safe.J (with mgo.SetSafe) if journaling is enabled

Mongo 2.6 errors if you attempt to set Safe.J when journaling is disabled. We introduce a new function, mongo.JournalEnabled, to detect if journaling is enabled at runtime; we update `state.Open` to use JournalEnabled to decide whether to set Safe.J.
Fixed incorrect mgo import
Merge pull request #451 from mjs/fix-mgo-import

Fixed incorrect mgo import