write type information into bson (_type), use that type to factory allocate query results