Move JSON tranforms into storage methods (bug 984984)

Added feature for storage methods to handle JSON conversion automatically.
Cleaned up all uses of storage to prevent duplicate encoding or decoding.
Wrote some basic tests.

I ran into some problems (syntax error while parsing JSON at startup) with this when testing when I didn't have all the existing JSON conversions cleaned out, which then persisted (because it is a persistence tool). Hopefully now that I've found them all, others won't have that, but it is something to watch out for.
I've got a better plan. I had eliminated all use of the raw methods, but forgotten to take out one of them and the comment. So I'll remove them and presto: raw methods have 100% test coverage!