Fix backlinks for internal links with parameters

This adds the parameter extraction code from the xhtml renderer to the
metadata renderer in order to not to include the parameters in the id
that is recorded as link target. A test case checks that the link is
actually returned as backlink (fails without the fix).