add support for nested DbObject instances to work with toArray

This means that if an instance of IDbObject is a mapped DbObject property then
it will have its toArray() method called and the result used as its value.