Improve exception handling

Ignore exceptions while flushing and make sure a new timer is always set.

With the old code if there was any exception while flushing, e.g. an error while connecting to Graphite, the process would not flush anymore.