Refactor sensor list in SensorService

Refactor sensor lists management logic in sensorservice:
  * Factor all sensor list management code into a separate class.
  * Remove error-prone repeated sensor lists.
  * Solve synchronization issue when sensor is added or removed during runtime.
  * Switch to STL containers.

Bug: b/27911774

Change-Id: I94d5571e1fa3166dbe893ffac2a2a7584be6349c
diff --git a/include/gui/Sensor.h b/include/gui/Sensor.h
index 3792540..353003c 100644
--- a/include/gui/Sensor.h
+++ b/include/gui/Sensor.h
@@ -56,7 +56,7 @@
         uint8_t b[16];
     } uuid_t;
 
-    Sensor();
+    Sensor(const char * name = "");
     Sensor(struct sensor_t const* hwSensor, int halVersion = 0);
     ~Sensor();
 
@@ -80,6 +80,7 @@
     int32_t getMaxDelay() const;
     uint32_t getFlags() const;
     bool isWakeUpSensor() const;
+    bool isDynamicSensor() const;
     int32_t getReportingMode() const;
     const uuid_t& getUuid() const;