Refactor for adding tests

Firstly, this does make the codebase pyflakes/pep8-compliant, but I can remove that commit if it's too invasive of a change.

Secondly, this refactors the memcached code to create 'requests' which are then issued against MemCacheProtocol instances. This made writing tests easier.

Thirdly, this adds a bunch of tests, as the codebase is a bit lacking in that regard.