fix bug 1079932 - More ordering in JSON API

- Translated fields - 'en' first, then other languages in alpha order
- Use OrderedDict more to preserve order
- Use unicode more consistantly
- Use JSON serializer in diffs, to preserve field order
- When order doesn't matter, sort related IDs by ID in cache