Rather than have `\xref@@' produce the output directly, because it's
very hairy and hard to replace, have it call a new macro,
`\formatxfref', to actually put the pieces together. This can be
overridden comfortably, even by novices.
Have the default `\formatxref' notice that `hyperref' is available and
do use its fancier features to include the category name in the link.