Fix reference snaks handling in ClaimHtmlGenerator

If we pass $reference->getSnaks() as a constructor param
for ByPropertyIdArray, then in some situations the snaks
in the reference itself are getting cast to array and then
HashArray->setElement() has an array instead of SnakList
which causes an uncaught exception.

Instead storing $snaks as a local variable and converting
that to an array, when instantiating the ByPropertyIdArray,
then this issue is avoided and the code will be more robust.

Bug: 71479
Change-Id: Ia5e9e7d7f7010fd3a3faa73067d3075225cb91e5