Fixes RDF export of subobjects

Partial integration of the patch https://gerrit.wikimedia.org/r/#/c/70047/4
from Dbeeson
The change to `SMW_ExportController.php` is massively scary and only made worst by the fact that it has no test coverage [0] which means that any alteration can introduce an inconsistency without a chance to make a before/after analysis. 

[0] https://scrutinizer-ci.com/g/SemanticMediaWiki/SemanticMediaWiki/code-structure/master/class/%2Bglobal%5CSMWExportController