Sync memorycache and timeutils from oslo.

Change-Id: Ibc61b07fe65d97f9a0eb60e514e29bc12b2f9f4a