[Sensors] Improvements in fetching reading for sensors with continuous reporting mode

If a platform sensors has continuous reporting mode its updates are not send via IPC, so there is a timer on Blink side which periodically reads the sensor data from shared buffer.

Before this change every sensor instance had its own repeating timer, however in case of multiple sensor instances it could bloat the thread task queue with unneeded requests to read the sensor data from shared buffer.

This patch introduces only one repeating timer per 'SensorProxy' (i.e. per frame) which is shared between all sensor instances of the same type.

Another consequent change is that now the 'SensorProxy' class is inherited from 'PageVisibilityObserver' (and the 'Sensor' class is not any more) which makes suspend/resume code path more efficient.

BUG=606766

Review-Url: https://codereview.chromium.org/2503853002
Cr-Commit-Position: refs/heads/master@{#434133}
11 files changed