CAS-1393: Memcached serialization fails when creating a proxy ticket

First commit
CAS-1393: Memcached serialization fails when creating a proxy ticket

Update according to Marvin's code review
Merge pull request #367 from leleuj/CAS-1393

CAS-1393: Memcached serialization fails when creating a proxy ticket