Allocate fewer objects

I have a hacked version of Firefox that identifies where object allocations in JS code occurs. With this, I've created a series of patches that reduces the number of allocations that occur when loading/viewing a PDF by up to 50%. All these eliminated allocations are of small, short-lived objects, which might not seem important, but actually are, because it reduces pressure on the garbage collector.

Of the eight documents I've tested, five of them had their peak RSS reduced by 15--40 MiB. And all the changes are pretty simple.