Avoid constructing nested ArrayObjects

From the PHP documentation: "[The] method [ArrayObject::append]
cannot be called when the ArrayObject was constructed from an
object. Use ArrayObject::offsetSet() instead."

But this happens when new ByPropertyIdArray( $claims );
is called with $claims being a Claims object. This causes very
strange and hard to track errors because almost all methods called
on such a nested ArrayObject work as expected except for append.

Nesting the two Classes the other way around is safe because Claims
already does have it's own constructor. I added tests for both cases.
Merge branch 'arrayobject' of github.com:wmde/WikibaseDataModel into arrayobject