WIP: add support for packaging with PDF.js extension - try 2

This is an alternate version of #1419.

The main difference is that now we don't rely on PDF.js's interception methods *at all*.

When we want to deploy over PDF, we simply redirect the browser to the integrated viewer, instead of relying on PDF.js's scripts to do so.

In this version, PDF.js's interception methods are completely disabled; we only use those scripts to *mark* pdf documents, but even if/when that does not work, we have an easy fallback for recognizing files.

In this version, our changes to the PDF.js scripts are actually smaller, and I consider the code in background.js to be more elegant.

Again, please ignore the first two commits (=noise), and check out the third, main one instead.