Fixed a memory issue with our javascript code.

Fixes [this issue](https://github.com/wordpress-mobile/WordPress-iOS-Editor/issues/341).

There's also a small chance that this PR will also fix [this issue](https://github.com/wordpress-mobile/WordPress-iOS-Editor/issues/327), although I will need someone with an iOS 7 capable device to try it out - as I couldn't reproduce it in the simulator.

/cc @bummytime