Data fixes

Fixes #657 and #674

Needed for theodi/shared#99

This gets the atom feed in the correct order (plus a whole bunch of tests), and fixes the JSON weirdness in #674 - it's actually had the effect of making the view code a lot neater too, which is nice.

I'll (hopefully) get fixes for #661 and #662 in a seperate PR later today.