tests/hghave: extract hghave.py
hghave is degraded to a bare script, moving the functions to hghave.py
so they can be shared later on.
<entry>
<title>{bookmark|escape}</title>
<link rel="alternate" href="{urlbase}{url}rev/{node|short}"/>
<id>{urlbase}{url}#bookmark-{node}</id>
<updated>{date|rfc3339date}</updated>
<published>{date|rfc3339date}</published>
<content type="text">{bookmark|strip|escape}</content>
</entry>