Bug 1109772 - Refactor bookmarks data access API.

This'll be a non-trivial bunch of work. I'm still hacking away, trying to get the abstractions right. Starting with bookmarks.

Parts 1-7 already merged; parts 8-10 now ready for review.
Would it make sense to use the Swift `Sequence` protocol here? Then you can use `for node in folder`. And instead of `get()` we could do `subscript(index: Int) -> BookmarkNode` - which fails hard on out of index, which is more correct than returning an optional I think.