Refactor API code to use annotator-store flaskless

Everything seems to work: reading, creating, updating, deleting, searching, permissions seem to work but need better testing, and in general more tests and thorough code review would be good.

To keep a consistent style and make refactoring easier, I decided to use traversal with a `@view_defaults` class everywhere, using the defaults class to specify the `context` predicate, so as to group the views within that. For the same reasons I do not use view names but use a resource for each location (I explictly state `name=''` for clarity, though that could be removed). I think this style works out nicely.

I put some questions in the comments, just search for the question marks.

The dependency on the next (flaskless) annotator-store version has yet to be added.
That idea probably popped up because this assertion used to be there[1]. Assertions are only executed when `__debug__==True`, so I think it's generally not a good idea to make application behaviour depend on assertions. I like them as a form of documentation though.

[1]: https://github.com/Treora/h/commit/5c566b906c966a85ee451ab5ec057014ce25217f#diff-ac609e76ec4fa9e512cba1c99ed896f0R176