I've seen form contexts like '/newticket', that will not validate to a
known Trac realm, and throw an Error

locale variable 'subcontext' referenced before assignment

instead because of misplacement of corresponding variable declaration.
Good news is, new db table definition do prevent recording of form data in
such strange (pseudo-)resources effectively in the future, but surely
the code might profit from a more verbose error message, when trying so.

The strftime format suddenly happend to be unicode on a production system,
so I fixed this as well. Apart from this the code looks quite usable so far
and arbitrary upgrades should be safe to follow. I'll provide all follow-ups
from this point of development onwards.

Beware: Early adopters, really backup all your Trac db's!
This is a change to TracForm db tables, that again can't be reverted easily.
If you've created (wiki) resources with one or more colons in name,
than do especially careful after-upgrade-checks to make sure, that
resource_id and subcontext have been split as properly.

This is a fundamental schema upgrade for all TracForms db tables.
While all form states should be kept perfectly consistent, there is no
automatic way to return to the old urlencoded states.
Database upgrade is completely untested with anything else but SQLite.
Testing is highly appreciated, but make sure to have a backup before, please.

Code changes introduce a new additional dependency: If used with Python <2.6
the JSON library simplejson is required for this plugin to work.
Tested with Python2.5; but Python has got it's own JSON library that is used
in preference, if a Python version from 2.6 onwards is detected.

The new state storage avoids problems with readability of unicode text
form content and has less processing overhead, i.e. for future query features.

A considerable amount of code cleanup has been included too, since I found it
not feasible to separate it into an own changeset.