Clone objects in immutable tests

Fixes #1314, fixes #1328.

Test Plan:
`grunt test`, `grunt test --debug` in Chrome and Firefox.
Fix jshint warnings in grunt/

Fixes #1052.

Test Plan:
jshint grunt
Merge pull request #1330 from spicyj/clone-imm

Clone objects in immutable tests.