templater: convert resources to a table of callables for future extension
I'm going to add a full templating support to the annotate command. As the
annotate is a filectx-oriented command, we'll need a way to look up a ctx
from a bounded fctx only when necessary.
This is the minimal change to support that. I'm thinking of defining a proper
interface to look up template resources to fix other issues, but that isn't
ready yet.
(Changes from V1: just updated tests and patch descriptions.)
{
"conduit_uri": "https://phab.mercurial-scm.org/api",
"repository.callsign": "HG",
"arc.land.onto.default": "@",
"base": "hg:.^"
}