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