Optional pretty printing

Adds a new option on export formats to pretty print the xml/json versus a single line that saves some bytes but is unfriendly to both humans and diffs.