Started porting unit tests from EnyimMemcached, also fixing bugs the tests exposed.