Handle internal links in XHTML export

Rewrites internal links in the XHTML export. So links in the content,
references and lists work.