Add testQueryBeforeAfterUpdateForSubobjectToLooseReference

Test is in response to https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/378#discussion_r14574081
That's still not clear to me. Looking at the actual code, it seems to me that the method names provided contain details about how the stuff is done that is not relevant in specifying the intent. And that is really what the method name should do, specify the intent.

How about `testSubobjectsGetRemovedWhenSavingAnEmptySemanticData`? Is that what this method intends to verify?

This made me realize the name `SemanticData` is not very good.