Add DBRef case in transform_object

When I tried to serialize an object with ReferenceField I found that these fields couldn't be serialized because transform_object method wasn't expect DBRef objects. The solution was check if the object is an instance of DBRef and, if affirmative, call transform_object with obj.id (an ObjectId instance). The object is now serialized successfully.