allow lookup from entire hierarchy in HTML templates

This passes `root_template` to the HTML template, allowing it to search
for references to autolink in the entire hierarchy, not just in the
subtree below its current module.