persistence: Serialize persistent data as JSON instead of Perl code.
Will eventually result in one less eval, though this change was actually mostly instigated from a desire to be able to run jq(1) on the raw data.