Collectd: Handle counter wrapping

Handle the wrapping of a COUNTER metric at 32 or 64 bits.

Contains relevant tests.

Commit 3c2474ebfcc9e8a2e0626746fc66a94c28a042d7 is also included in https://github.com/trbs/bucky/pull/36 and adds generic collectd tests.