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

Change-Id: I1dae910e9d14db56d6388a71d76b1a479d5786b0