Call getQualifiers and getReferences outside of iterator_to_array

In the getAllSnaks calls in Claim and Statement, it seems in some
situations that the Traversable objects are being converted to array,
by reference, in the ReferenceList itself and possibly for qualifiers also.

This change may help fix bug 71519.
Merge pull request #216 from wmde/getallsnaks

Call getQualifiers and getReferences outside of iterator_to_array