[autotest] Add two rpm util classes

This is the 1st CL for making the rpm infra read rpm/outlet/hydra
information from AFE.

PowerUnitInfo: This is a class that wraps all information related
to a dut's power control. It will be passed from frontend_server
to rpm_dispatcher to rpm_controller. It wraps all info in a single
class so that in the future, if we want to pass more information
around, we can simply add stuff to this class without having to modify
frontend_server, rpm_dispatcher, rpm_controller.

LRUCache: A simple lru cache to store PowerUnitInfo instances.
When we got a request for a device (dut/servo), a PowerUnitInfo
instace will be created and populated. For chromeos-duts, we will
retrieve such info from AFE. The LRU is used to store recently used
PowerUnitInfo, so that we don't hit the AFE too often.

TEST=unittest
BUG=chromium:392548

Change-Id: Iec153b6dfa640fc288a1bd664a307745dcd12e12
Reviewed-on: https://chromium-review.googlesource.com/212349
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
3 files changed