association persistance tests and changes

changed? now returns true if the object is new
make sure to recreate associations if they already exist in the
attributes hash.
support strong parameters for where clauses

This has become necessary as of Rails 4.0.9 and 4.1.5 because of this
security fix:
https://groups.google.com/forum/#!topic/rubyonrails-security/M4chq5Sb540
Merge remote-tracking branch 'origin/master' into association_persistance