mongoid/mongoid — pull request #3443 by jasl (2013-12-09 22:34:36+00:00)
Title: fix pushing to n-to-n in a embedded in doc will raise nil error when not assign parent

situation has described in #3019

we could return a empty hash when not assign a parent, but there is a problem is ```atomic_paths``` and ```atomic_selector``` are cached and will not change whatever association changing.
e.g
```ruby
2.0.0p353 :012 > a1 = A.create
=> #
2.0.0p353 :013 > a2 = A.create
=> #
2.0.0p353 :014 >
2.0.0p353 :015 > b = B.new
=> #
2.0.0p353 :016 > b.a = a1
=> #
2.0.0p353 :017 > b.atomic_path
=> "b"
2.0.0p353 :018 > b.atomic_selector
=> {"_id"=>BSON::ObjectId('52a6450a4a6173a58b000000'), "b._id"=>BSON::ObjectId('52a6450b4a6173a58b020000')}
2.0.0p353 :019 > a1
=> #
2.0.0p353 :020 > b.a = a2
=> #
2.0.0p353 :021 > b.atomic_path
=> "b"
2.0.0p353 :022 > b.atomic_selector
=> {"_id"=>BSON::ObjectId('52a6450a4a6173a58b000000'), "b._id"=>BSON::ObjectId('52a6450b4a6173a58b020000')}
2.0.0p353 :023 > a2
=> #
```
so I think we need a smarty way to caching them