enhancing toJSON and toObject to pump out cached relations, optionally
Merge pull request #374 from mshick/tojson

enhancing toJSON and toObject to pump out cached relations, optionally
Update memory.js

fixes #376
Merge pull request #377 from pocesar/master

Update memory.js, removed `new`
Merge remote-tracking branch 'upstream/master'