Ported pickler, compression, check_key and other features from python-memcache

I've only done some minor testing, not sure whether everything is right ...