Make QueueOptimizer easier to read.

QueueOptimizer is really hard to read. Enough so that it's blocking my
efforts to streamline the representation used for operator lists.

This patch improves its readability in the following ways.

- More descriptive variable names make the sequence checking much clearer,
  as do additional comments.

- The addState() functions now return the index of the first op past the
  sequence, instead of setting context.currentOperation to the last op of
  the sequence.

- The loop in optimize() is clearer.

- The array modification in the fourth addState() function is much clearer
  -- we're just removing trios of ops.

- All four |addState| functions are now more consistent with each other.

I used some debug printfs to find documents where these optimizations are
used and then checked that the number of optimized ops was the same before
and after my changes.
Removing unused code
Enforcing JSHint's undef option
Enforcing JSHint's noarg and nonbsp options
Minimize memory usage of font-related arrays.

This patch replaces some vanilla arrays with typed arrays, and avoids
some array copying.

It reduces the peak RSS when viewing
http://www.dynacw.co.jp/Portals/3/fontsamplepdf/sample_4942546800828.pdf
from ~940 MiB to ~750 MiB, and reduces its load time from 83 to 76 ms.
Optimize common cases in hexToStr().

This avoids the creation of over two million array objects when viewing
http://www.dynacw.co.jp/Portals/3/fontsamplepdf/sample_4942546800828.pdf,
and reduces load time from 76 to 73 ms.
Feature detection after downgrading the browser.

If a user downgrades from Chromium 35+ to 34, then the PDF Viewer
extension will not work any more because the extension assumes
that certain features were available based on the cached feature
detection results.

To resolve this problem, all feature detection scripts run again
if the browser was downgraded.
Re-factor parsing of the Linearization dictionary
Avoid creating intermediate strings in the PostScriptLexer
Merge pull request #5023 from Snuffleupagus/linearization-refactor

Re-factor parsing of the Linearization dictionary
Merge pull request #5063 from Snuffleupagus/ps-parser-avoid-intermediate-string-creation

Avoid creating intermediate strings in the PostScriptLexer
Right-size |chars.length| and |type.length| in bidi().

This lets the JS engine resize the array elements buffer immediately,
thus avoiding some intermediate resizings. This can save multiple MiBs
of reallocation in text-heavy files.
Merge pull request #5096 from nnethercote/bidi-length

Right-size |chars.length| and |type.length| in bidi().
Add a reduced test-case for bug 1027533
Merge pull request #5099 from Snuffleupagus/bug-1027533-test

Add a reduced test-case for bug 1027533
Converting PDFFindBar and PDFFindController to classes
Merge pull request #5059 from timvandermeij/unused-code

Removing unused code and enforcing additional JSHint options
Make CMap.map quasi-private.

This makes it easier for the representation to be improved.
Optimize CMap.prototype.forEach().

This change avoids the element stringification caused by for..in for the
vast majority of CMaps.

When loading the PDF from issue #4580, this change reduces peak RSS from ~650
to ~600 MiB, and improves overall speed by ~20%, from 902 ms to 713 ms.  Other
CMap-heavy documents will also see improvements.
Merge pull request #5090 from Rob--W/crx-feature-detect-downgrade

Re-run feature detection after downgrading the Chromium browser.