Scope cleanup part 1

User visible:
 * Introduced the "Tab", "Selection" and "Comments" views, as per #1091
 * Fixed the following problems:
   * Clicking on a tab does not update scope name
   * Clicking on a highlight does not update scope name
   * Clicking on heatmap does not update scope name

Internal:
 * Change function names:
   * applyview -> applyView
   * applysor -> applySort
 * Move the `view` field from viewer's scope to rootScope
 * The `updateViewer` and `showViewer` methods of the Hypothesis class
   no expect a `viewName` parameter (alongside the list of annotations),
   which they use to update the `view` field of the rootScope.
 * Added a `getComments` RPC call in guest, to collect comments for comments
   scope.
Simplify scope switch code
Simplify comment scope handling
Fix the Document scope: don't show orphans here
Removed redundant line
Fixed type (thx to @gergely-ujvari)
Merge pull request #1100 from hypothesis/1091-scope-cleanup-1

Scope cleanup part 1

Fixes #1099