DomDocument string generate

Adding the generate function to the DomDocument::saveXML function in
order to work with string rather than object.

Also updated the Symphony::Configuration()->write() methods for saving
config data in 2.4 onwards.