Bug 1109772 - Refactor data access API. (WIP)

This'll be a non-trivial bunch of work. I'm still hacking away, trying to get the abstractions right. Starting with bookmarks.

Pull request here for clarity; do not merge this yet.
We will; this is a step along the path.

(It can't fail right now, any more than the current code does, but I'm assuming background changes.)

As this evolves we'll be backing it with something more sophisticated than a tree of simple objects. Mutations will all go via the model, so we'll be driving the refresh from something like an `onDatasetChanged` callback. It's conceivable that we'll actually be doing that by swapping out the model for a new one, at least for bookmarks — from that perspective, you can think of `BookmarksModel` as a snapshot of a particular layer in the folder hierarchy, and navigation will grab a new model.