(bug 50478) Filter langlinks by site group.

LangLinkHandler should not put links to other site groups
into the sidebar.

Change-Id: Icfd832ac4a36c463eecee021fce4ce59bf664c8b
(bug 50729, bug 51699) handle exception in the langlinkhander

- there are legitimate reasons for the sites table to be empty
or missing the site id!
- in such situations, no wikibase lang links can be found and none
added, with warning

Change-Id: Icb5350f9bd75a522847f82f1215ff5bffcfea4d6