Fix missing header and pedantic warnings

These two commits fix the following things:
- sys/types.h is not included, resulting in errors about missing types such as ssize_t (GCC 4.8).
- BSON_STATIC_ASSERT creates typedefs of size zero, resulting in warnings with -Wpedantic (GCC 4.8).