Add toJSON and fromJSON functions to allow serialization of the filter
Reduce size of serialized string by changing join mode on the table.
Merge pull request #2 from richthegeek/patch-1

Thanks.  I'll put this in, though there is no reason to save the scratch data.  I'll fix it up and push the changes.