Remove useless import
Close connection after memcache operation.

It avoid long running TCP sessions and transient errors when memcache
is recycle.
Factorise memcache key normalisation and apply to hosts
Trap memcache exception