Retry Memcache writes if we get a RingError

Closes #206 and travis-ci/travis-ci#1191.

/cc @drogus