Implement initial GPX/TCX output

It should not have been this hard! There's no easy way to compare
QDomDocument's deterministically :(