make identity.Identity more easily JSON serializable (#1017)
These result in cleaner JSON for things like test fixtures. Used in new
relay project.
cc: @whyrusleeping to check that other code isn't depending on the
previous serialization. Eg, I think you have a memcache identity cache
around somewhere. The redis caching stuff uses a different reflect-based
serialization technique.