Integrate BSONDocument in BSONEncoder class.