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.
Yes, a typo, thanks for catching that.