Fix line chart history amount sometimes being incorrect
This fixes SensorDataModel so UpdateInterval is always reported correctly when the model is ready, thereby fixing bug 433064. It also contains some fixes for autotests and some other small fixes.
Edited by Arjen Hiemstra