Add connection failure recovery for the MongoDB

Conflicts:
	libraries/mongodb.rb
Fix tabs
Merge pull request #121 from Adallom/replicaset_support_connection_recovery

Add connection recovery support (also fixes timing bug after restart)