first step to refactor - make work with mongo-c-driver git HEAD
define bson_iterator_subobject_init to work with the older c driver
new versions of bson require we destroy the subobj iter
refactor for autodiscovery of nodes

 * add dynamic database detection and other refactors
add copyright info
modify how we read the output of listDatabases
fix naming of global lock key
add the ability to query secondaries
fix up c styling to be consitant
add check for bson_iterator_subobject_init to determine libmongoc version

 * newer versions in git use bson_iterator_subobject_init which requires
   the object to be passed to bson_destroy after use
 * the current release 0.7.x uses bson_iterator_subobject which
   uses static pointers and does not copy any data
   in which case calling bson_destroy will cause a segfault
handle different versions of the mongo c driver with defines

 * newer versions in git use bson_iterator_subobject_init which requires
   the object to be passed to bson_destroy after use
 * the current release 0.7.x uses bson_iterator_subobject which
   uses static pointers and does not copy any data
   in which case calling bson_destroy will cause a segfault