Add bool as a mongo-safe type.

Note that bool is a subclass of int, so isinstance() made it work. Wow,
my confidence in isinstance(is really shook right now.