rrdtool: Take update time as we start updating db
Turns out commit
03aa50c69 didn't fix the drifting problem
completely. It is still possible that acquiring the data takes
arbitrarily long time and we end up inserting the data in the middle
of the database update interval, which will cause rrdtool to
interpolate the data point with previous or next entry.
Fix it by taking the timestamp before we start the update procedure
and using that time as we feed in the data.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>