(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
(testing) waiting in Selenium tests for propagation of removed sitelinks

Change-Id: I93e95934fffd9fef580067e621f31d509689da5d
Merge "(bug 45037) show edit link only if we have repo links" into mw1.21-wmf12
Merge "(testing) waiting in Selenium tests for propagation of removed sitelinks" into mw1.21-wmf12