Consolidate code paths around deciding about PDF.js

Annotator's PDF.js plugin replaces the document plugin
for PDF.js, so when we are using the PDF plugin, we
don't want to load the document plugin.

For this, we are removing it from the options, in
presence of PDF.

This commit changes how we test for PDF.

Earlier, we were simply testing for the presence of the
global PDF.js object, but it's better to actually
use the test already implemented inside the PDF plugin.

This has two benefits:
 * If the PDF plugin is not present, we won't
   mistakenly  remove the document plugin.
 * If the PDF plugin decides that it can't deploy,
   for whatever reason, we won't
   mistakenly remove the document plugin.
Load the PDF or the Document plugin conditionally
Merge pull request #1753 from hypothesis/better-pdf-test

Consolidate code paths around deciding about PDF.js