memc global pointer should be thread local

The global memcached_st structure *memc should be thread local to ensure
thread safety.