history: Fix time compression of data points
The algorithm tries to use floating point timestamps. However, the precision of floating point is too low for unix time, causing rounding issues. This can cause extra points to be inserted (or too few) under some conditions, creating a scenario where the test-suite fails randomly.
Do this properly by using 64bit integers for the time. The 64bit integer should have enough head-room even for very long histories.
Closes: #167 (closed)