Handle various deployment problems

Detect and handle these problems:
 * User is trying to deploy the extension over a local file, but forgot to grant file permissions
 * When trying to deploy on an HTML document over the file:/// protocol
 * When trying to deploy on a PDF file, withouth PDF.js

Fixes #1650 and #1663.
A bit of history.

@aron wrote:

> Smaller methods are more readable. For example if this method became:
> 
> ```
> function inject(tab) {
>   if (isFileURL(tab.url)) {
>     injectIntoLocalDoument(tab)
>   }
>   else if (isPDFURL(tab.url)) {
>     injectIntoPDF(tab)
>   }
>   else {
>     injectIntoDocument(tab)
>   }
> }
> ```
> 
> I can then read and understand everything this method does very quickly without having to scroll down the file.

Obviously, we all know that. That's why I originally wrote the predecessor or this code in 589366e632666e6d406a8b17231da472cc7d6db1 like this:

```
  var pdf = isPDF(tab.id, tab.url)
  [...]
  if (pdf) {
    // console.log("Reloading document with PDF.js...")
    deployPDFjs(tab.id, tab.url)
  } else {
    // console.log("Doing normal non-pdf insertion on page action")
    inject(tab.id)
  }
```

(The method names could be improved, but my intention was the same as yours above.)

Then @tilgovi came along, and rewrote it from scratch in 0b43c2b996cbbfb9dcc0effe0fb2f4ea953155bc like this:

```
function inject(tab) {
  if (tab.url.indexOf('.pdf') > 0) {
      if (!isPDFViewerURL(tab.url)) {
        chrome.tabs.update(tab.id, {
          url: getPDFViewerURL(tab.url)
        })
      }
  } else {
    chrome.tabs.executeScript(tab.id, {
      file: 'public/embed.js'
    })
    chrome.tabs.executeScript(tab.id, {
      code: 'window.annotator = true;'
    })
  }
}
```
... and that's the code that has eventually morphed into the long form you marked for refactoring. The new, refactored version (with the separate small functions) is actually closer to my original intention.
 
  * * *

Anyway, I am happy with either form; what I would *really* like to see is a consistent set of practices that we apply consistently to all our code - instead of arbitrary going left and right, according to momentary whims.