MongoDB rewrite

* requires mongo-c-driver 0.7.x or git HEAD
* Autodetects if it is running on the primary in a replica set
    * If primary it collects data
    * If secondary it checks each interval to see if it has become the primary
* AllowSecodaryQuery option added
    * for performance on servers with a lot of databases you can now have the plugin query a secondary server
    * this trades off consistency for conservation of resources depending on the latency of the replication (only done for dbStats calls which walks all the files in a database)