This allows using a UUIDField primary key along with the JSON session serializer. Thanks to Trac alias jamesbeith for the report and Simon Charette for the initial patch. Backport of 0f7f5bc9e7a94ab91c2b3db29ef7cf000eff593f from master