Small refactoring for ReferencedEntitiesFinder

There still was a warning shown in PHPStorm. The introduction of the
$dataValue variable makes it go away.

Also the array of EntityId objects had a strange name. $links sounds
like a list of SiteLink objects.

Change-Id: Ibb6e011b6de9cce1629619c810b94f13a1ff33de
Merge "Small refactoring for ReferencedEntitiesFinder"