bson_metrics example
make bson_realloc really free memory
use reallocf instead of realloc on OS X
Merge pull request #43 from skaes/fix-realloc-zero

make bson_realloc really free memory
memory: simplify realloc a bit.

Now that we check explicitely for num_bytes == 0, we can drop the secondary
check at the end of the realloc and simply fail on NULL.
Merge branch 'master-metrics' of github.com:gjmurakami-10gen/libbson into gjmurakami-10gen-master-metrics
build: require -lm for metrics.
update .gitignore.
metrics: protect against max recursion depth of bson document.
metrics: style cleanup.
Add a realloc ctx to bson_writer_new

Add a realloc_func_ctx to bson_writer_new and thread an additional
realloc_func_ctx on bson objects to allow for custom reallocs with a
handle.  This is to provide support for custom allocators without global
storage.  One that comes to mind is a pool allocator, where the context
object is a specific pool.
keys: just use snprintf for key generation after 1000.

This is not super common, so the slightly slower snprintf seems the
safest route.
keys: and set strptr to str.
metrics: use PRIu64 for format.
bson-metrics doc_size_max and doc_size_average
Updates for MacOS and Xcode
Merge pull request #44 from gjmurakami-10gen/master-metrics

bson-metrics doc_size_max and doc_size_average
Merge pull request #46 from paulmelnikow/gitignore

Updates for MacOS and Xcode
Add a couple more useful helpers
Merge pull request #49 from paulmelnikow/helpers

Add a couple more useful helpers