Sync openstack/common/memorycache.py with Oslo

This fixes an issue in Client.get(), where a dictionary was modified as we
iterated on its keys, which does not work in Python 3.

Change-Id: I37583504dcc672060a3d780dce46418baa32dd53
Merge "Sync openstack/common/memorycache.py with Oslo"