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`.


Wouldn't it be much simpler to just change this line to?:
```c
if (p >= 1.0)
  return (1);
```