db: update to have optimized fetching of last value
db: update to have optimized fetching of last value

This drastically improves speed of fetching last value of a sensor.
Previously, the query for single sensor took up to 2 seconds. Currently,
fetching dozen of sensor last values took up to few hundered milliseconds.

We now fetch data from the sensor_history_last materialized view.

Signed-off-by: Jan Viktorin <3eab6ac54c005c4408f608556a6663b7f2abede7@fit.vutbr.cz>

BeeeOn/server,BeeeOn/server,BeeeOn/server,BeeeOn/server