rank: add context and template keyword
This makes the stored rank property accessible, to be expanded and printed.
Differential Revision: https://phab.mercurial-scm.org/D12140
#require docutils gettext $ $TESTDIR/check-gendoc sv checking for parse errors