bson: make string and thread modules public

Drivers such as the C driver will likely want to use these things. So
might as well keep the abstraction in one place.
string: add bson_strdup() and bson_strdup_printf().

These are some useful routines for building strings. Especially when
dealing with situations like host:port strings.