Only nullify the keyId if we found the related model
added test the reproduces the original problem
Tests: load master files from `rawgithub.com/jashkenas`, for correct content-type and no redirects. Closes #403
Merge pull request #406 from idanz/patch-1

Only nullify the keyId if we found the related model
Fix typo in tests
Fix for #375 - toJSON should include IDs of unregistered models

Side effect (seems fine to me) is that it also continues to return IDs of deleted models, which
seems less magic and more expected to me - also allows for 'soft deletes' where an object itself
is deleted but other objects can still have references to it.
Fixup for numerical IDs
return null rather than undefined
Merge pull request #376 from elasticsales/master

Fix for #375 - toJSON should include IDs of unregistered models
Fix some code style; add a test for #407
Compatibility fixes for Backbone 1.1; pass on return values for Collection methods.
More code style/comment tweaks
HasOne relations: fix explicitly nullifying a relation before the related model is ever found. Closes #407