Obtain a persistent ObjectID for any newly inserted object before we save

Fixes #25
Merge pull request #25 from kylef/persistentid

Duplicate objects