MemcachedTool: revert "Simplify code."

This reverts commit 8e0674d8fd5cd0631ff959fa81f01cd500a74893.

This fixes a regression in test_Member_download_pdf_format (testDmsWithFlare).