(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) wikibase_item: the associated prefixed item id

This is used by the skin in constructing the "edit links" link directly to the Q### page,
or to know if a page is connected to the wikibase repo.

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: I97cc9378477953bddebd04840871964f31ef1b7f
Merge "(bug 45037) show edit link only if we have repo links"