Allocate fewer objects when parsing 2 and 4 byte chunks.

This is achieved by adding getBytes2() and getBytes4() to streams, and by
changing int16() and int32() to take multiple scalar args instead of an array
arg.
Avoid allocations in bidi().
Avoid more allocations in bidi().
Avoid allocations in executeCommand().
Fix Issue #4461: Pages without \Resources in their dictionary fail to load

When no "\Resource" entry could be found return an empty dictionary
Refactor and fix style of core.js
Add load test for Issue #4461