a huge evenings work:

* pattern info is now cached in memory for quick retrieval
* json content for step patterns is now passed down as a number
* pattern cache is versionned (soon to stop unchanged patterns being transmitted)
* pattern bits are stored as blobs to avoid integer column overflow