Add BSONType type class for types serializable to BSON

Get rid of serialization exceptions once and for all.

Create a type class that allows certain types to be serialized into BSON.