fix flush race in rrdcached -- Christian Hitz