Data loading methods should return preloaded data

If there is data in a state object return it rather than trying to load
it from the cache or over the network.

This change lets us simplify the popstate method as we can then always
just try and load the data.

Move the logic for restore subsection into its own method to make the
popstate method clearer.

Also fix a tiny bug where the parseParthname would incorrectly parse
`/browse`.