Add testQueryBeforeAfterUpdateForSubobjectToLooseReference

Test is in response to https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/378#discussion_r14574081
This name made me laugh. What?! Can you try rephrasing that? Often it nicely fits in this format `testGivenSomeSituation_someActionCausesSomeResult`