Abstract away memcached from the ticket-store.

Makes for easier testing, and easier plugging of other backends.