Consolidate the code in our custom markdown processor
With this commit we are consolidating all the pieces of code needing to
extract the namespace, project name and user name corresponding to the
page displayed in a single place simplifying the maintenance of said
piece of code and avoiding to fix bugs in multiple places.
This simple consolidate fixes automatically linking to a commit by
providing its hash in markdown.
Fixes https://pagure.io/pagure/issue/2612
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>