Clone objects in immutable tests

Fixes #1314, fixes #1328.

Test Plan:
`grunt test`, `grunt test --debug` in Chrome and Firefox.

cc @benjamn @zpao