Fix issue with round tripping of DBObjects.

Previously, embedded collections were saved and read in an incompatible
way (array vs BasicDBList).
Added test case for round tripping.