Only use data-font-name attributes when necessary.

The data-font-name attribute of textLayer divs are only used by the Font
Inspector. This change ensures they are only present when the pdfBug
tools are enabled.
Merge pull request #5193 from nnethercote/data-font-name

Only use data-font-name attributes when necessary.
Debounces scroll events in web viewer.

As requested in #5178, this change debounces the scroll events.
The reason for doing so is that browsers can event-storm especially on
scroll, communicating hundreds of subpixel changes.

The main reason for this resulting in poor performance is that on each
scroll event `scrollTop` was queried, which forces layouting.

This change will use `requestAnimationFrame` to make sure the browser can
allocate enough time to other tasks. The delay is however quite small, thus
the reduction in executions is less noticeable. Modern browsers however utilize
`requestAnimationFrame` to smoothen out rendering.
Fixes Type3 negative font direction
Apply the GRAYSCALE_1BPP optimization when `needsDecode` is set.

The scanned, black-and-white document at
https://bugzilla.mozilla.org/show_bug.cgi?id=835380 doesn't benefit from
the critical GRAYSCALE_1BPP optimization because the optimization is
skipped if `needsDecode` is set.

This change addresses that, and reduces both rendering time and memory
usage for that document by almost 10x.
Merge pull request #5210 from yurydelendik/type3dir

Fixes Type3 negative font direction
Merge pull request #5208 from CodingFabian/debounce-scroll

Debounces scroll events in web viewer.
Fix ensureByte() function name (copy-and-paste error)
Merge pull request #5212 from fkaelberer/fixFunctionName

Fix ensureByte() function name (copy-and-paste error)
Merge pull request #5204 from nnethercote/needsDecode

Apply the GRAYSCALE_1BPP optimization when `needsDecode` is set.