Refactor SensorListeners and SensorClientWithRate into helper types.

The logic of SensorListeners is generally helpful to everyone who needs to maintain a list of clients associated with a rate of data exchange.
Moving these out of CarSensorService and making them generic in the type of the listener object helps other interested clients reuse this code.

Test: build
Change-Id: Ibe73c4b495e384a411f682ee30555424becf7eaa
2 files changed