bugfix remainingfreetime calculation

The remainingfreetime calculation had one problem as i only collects the
data for as many days it is looking back. In line 768 there is a compare
of available lines in cache file and line inside the timeframe. This
compare results every time with 0 before. Now we collect more data than
the given lookback time.