Enable resolving deferreds on newly added objects

The trick is to pass unresolved deferreds all way up
the containers tree until it is resolved.
Add test for resolving refs inside newly created objs
Merge pull request #9 from tsufiev/resolve-up

Resolve up