Handle shift click ranges correctly

* Shift click above and below previously selected rows
* Shift clicking now toggles the range based on the state of the
clicked row, eg. you can now unselect in groups
Mark rows as selected on load

* The browser maintains the state of checkboxes when moving
back/forward, our page needs to respond by applying the selected row
class
* The header state should also remain in sync
* Refactor so that shift clicking and normal clicking use the same code
paths
* Toggling a checkbox with shift click when no previous toggles have
been changed should work as normal