Use DOMParser and XMLSerializer

This is much faster, and allows us to remove Node and the serializer.
Write output to a temporary local file to avoid limitations of data: URL
Remove consistency checking and fixing

Experimentation shows that assumptions about consistency are incorrect, due to
the way the device handles losing its GPS signal.
Fix tabs
Split into separate JS files for readability
Fix indentation
Many large changes which should really be split up

- Fix consistency checks
- Factor out methods
- Improve display