(bug 45037) show edit link only if we have repo links

This also fixes bug 44536 to have Q### links instead of link via Special:ItemByTitle

This patch adds parser output and output page properties that indicate:

1) userepolinks: if a page uses repo links... e.g. they've been suppressed or not.
if not, it considers if the page is associated with the repo and has links.

2) wikibase_item: the associated prefixed item id, added regardless if userepolinks
is true or not.

Then it's easier and more efficient for the code to determine whether or not to
add "edit links" link and build the link to the associated item.

Change-Id: I9bcf497f23b3d28f58fda964d74b7097b28aac2b
Merge "(bug 45037) show edit link only if we have repo links"