CodecRegistry is again an interface, and RootCodecFactory is now a public implementation.  CodecSourceContext is no longer public, it implement\
s CodecRegistry, and   has been renamed to ChildCodecFactory
Renamed PrimitiveCodecSource to DocumentCodecSource
Created BsonTypeClassMap class that encapsulated the default mapping from a BSON type to a Class to decode it to.
Implemented equals and hashCode for new BSON value types.
Tightening up document codec
Test specification for DocumentCodec
Renamed PrimitiveCodecSource to DBObjectCodecSource
Added support for a closed type system for BSON, which among other things includes a type-safe BsonDocument class as well as a BsonDocumentCodec.  Introduce a BsonValue base class for all BSON types, and added ones that were missing, most notably BsonDocument, BsonArray, and the missing primitives like BsonInt32, BsonInt64, BsonBoolean, etc.
Added no-args constructor for BsonArray
Moved CodecWithScope that contains a Document from org.bson.types to org.mongodb, the same package as Document
Re-add org.bson.type.CodeWithScope, but this time with a dependency on BsonDocument instead of Document.
Added BsonDocumentWriter, a subclass of BsonWriter that writes BSON directly into a BsonDocument.  This is useful for converting an instance of any class with an Encoder into a BsonDocument.
Changed CollectibleCodec contract to generate an _id if absent, and if not to return the current value.  MongoCollection now has a Codec property instead of a CollectibleCodec property, and does instanceof check on it as necessary.
Moved BSONTimestamp and associated classes to driver-compat