Add caching for ec2 mapping ids.

Requests to map ec2 ids can be slow when there are a large number
of instances. These shouldn't ever change so cache them in memory
for a week. The one week timeout is simply to prevent memory from
growing uncontrollably.

Fixes bug 1157437

Change-Id: I3f1c68959a933a7aaa50f122c34a716264c8722d
(cherry picked from commit 76844433f69a7c29ed4566ad34d7e9740feaf660)
Merge "Add caching for ec2 mapping ids." into milestone-proposed