bug-fixes and small improvements from the Hypothes.is team

Hi,

In order to finally merge our work back to Annotator, I have started to re-base our changes to latest upstream code.
These commits are the result of that.

I am separating our changes to small, documented, tested change-sets, so you can individually review/cherry-pick them, as you see fit.