Fixes RDF export of subobjects

Partial integration of the patch https://gerrit.wikimedia.org/r/#/c/70047/4
from Dbeeson
This doesn't belong here, this needs to go into DIWikiPage::getFormattedSortKey()