records: prettify MarcXML on creation

* Makes MarcXML more readable and properly indented.

* Turns [this](http://pastebin.com/cYRE2s68) into [this](http://pastebin.com/eqZ92A47).

See #1926.