Refactor jpg.js and include forceRGBoutput, correct style of image.js

This refactors getData to be more readable and extracts all the color
conversion algorithms to their own functions. The resulting code was then
cleaned up.
This also introduces a flag `forceRGBoutput` to getData, that allows to always
get the data as a `width * height * 3` bytes long RGB buffer
Move the colour conversion to jpg.js

Benchmarking shows that this improves performance for the invitation document
from https://github.com/mozilla/pdf.js/issues/3809 by 35%
Ensure that the viewer loads even if there are errors when the preferences are read
Merge pull request #4528 from bthorben/lessColorConversion

Less color conversion
Merge pull request #4693 from Snuffleupagus/preferences-reject

Ensure that the viewer loads even if there are errors when the preferences are read
Reduces memory used during testing
Merge pull request #4699 from yurydelendik/testmem

Reduces memory used during testing
Add a preference to set the sidebarView on load
Merge pull request #4669 from Snuffleupagus/sidebar-pref

Add a preference to set the sidebarView on load
Fixes DownloadManager for IE10 and above
Merge pull request #4689 from timvandermeij/ie-attachments

Fixes DownloadManager for IE10 and above
Prevent trying to map characters to the specials unicode block in adjustMapping (issue 4650)
Merge pull request #4701 from Snuffleupagus/issue-4650

Prevent trying to map characters to the specials unicode block in adjustMapping (issue 4650)
link to FAQ
Adds FAQ link
Merge pull request #4707 from bthorben/patch-1

Link to FAQ from startpage
Catch error when the creation of localStorage polyfill fails in the generic viewer
Refactor how the database is read in ViewHistory
Added reject polyfill and PromiseCapability
Merge pull request #4700 from pramodhkp/refactoring

Reject polyfill and createPromiseCapability