Factor out SdrObject::dumpAsXml() from SwDoc::dumpAsXml()

Change-Id: I043f740c73f1b39d81383f4f1eab2aae009ac2ba