MongoClient() updates, lock race fix, write concern support

I've added logic to use MongoClient() if it's available, and to fallback to Mongo(). Along with that comes the now defunct 'safe' mode being used with Mongo(). Write concern/preferences are now used with MongoClient, and it fallsback to 'safe' mode with Mongo().

New config options:

connection_opts -- array of options to pass down to MongoClient()
write_concern -- same default as MongoClient, 1, can be changed to 2+ to require writes to secondaries
write_journal -- same default as MongoClient, false, can be enabled to require journal before ack

I also updated gc() so it uses w=0 instead of safe=false if using MongoClient.

I replaced ->save with ->insert in lock(), fixing #1. The lock is now using insert. I tested and confirmed the duplicate key exception gets thrown. The catch properly ignores that exception, but also now properly breaks out on any other exception (like write concern timeout).

I fixed a potential lock-out issue when a replication time out occurs. The class now calls unlock() to remove the partial writes (mongodb doesn't do this on it's own).

Updated dbInit() to use createIndex() instead of the defunct ensureIndex() for > '1.5.0'
@nicktacular 

Not restoring the previous configs? It's erroring out in this scenario... this config option is simply being overridden before dieing so not sure where/why the config would need restored to previous value. Basically this was to resolve a weird scenario when doing stress-testing where it would end up stuck in a partial lock-state.

This would be an example where I tried to use your existing code rather than rehash a bunch.

I will clean it up to be more clear rather than trying to fit with your existing logic.