Add testQueryBeforeAfterUpdateForSubobjectToLooseReference

Test is in response to https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/378#discussion_r14574081
After this gets merged we plan to remove the skips in #378 and make them pass as well