Clean refs

@coen-hyde this fixes a nasty issue that I previously introduced it seems :blush:

I don't fully understand what causes it, but reading a sub property of a document that is later saved as a ref causes null properties to be saved against the ref. 

I've put in a test and fixed it. You can see the issue visually here:

![query_in_shanty-mongo-testing article](https://f.cloud.github.com/assets/41235/910333/223b8ce2-fdd8-11e2-8b0f-0faaf6445049.png)