Performance improvements to Serializer.to_simple(), which gets called all the time.
Merge branch 'serializer-speed-up' into performance-improvements
Performance improvements. Got ResourceProfilingTestCase down from about 8.6s to 7.4s.