appview/pages: rework caching mechanism
instead of loading all templates at once and storing into a map, we now
memoize the results of `parse`. the first call to `parse` will require
calculation but subsequent calls will be cached.
this is simpler to reason about because the new execution model requires
us to parse differently for each "base" template that is being used:
- for timeline, it is necessary to parse with layouts/base
- for repo-index, it is necessary to parse with layouts/base and
layouts/repobase in that order
the previous approach to loading also had a latent bug: all layouts were
loaded atop each other in alphabetical order (order of iteration over
the filesystem), and therefore it was not possible to selectively parse
and execute templates on a subset of layouts.
Signed-off-by: oppiliappan <me@oppi.li>