memc global pointer should be thread local

The global memcached_st structure *memc should be thread local to ensure thread safety.

According to the [libmemcached document](http://docs.libmemcached.org/libmemcached.html):

> memcached_st structures are thread-safe, but each thread must contain its own structure (that is, if you want to share these among threads you must provide your own locking).