Add hook for CAS based memcache mergeable

Also made the key type generic.
injections are usually accepted implicitly. Why the difference here?