Fix problem with write limits

I'm currently having an overloaded server running Collectd.
PR #280 (merged in collectd-5.4.0) is working well except in some strange cases. This PR fixes the problems with comparisons on `long` instead of `double` and removing all equality checks on `double`.