typesafe MIN and MAX macros.
Add BSON_LIKELY and BSON_UNLIKELY macros for GCC.
start on some mingw support.

of course, the tid/pid stuff is still going to be completely broken.
but at least this can compile now.