Optimize Redis connection usage in collectAndCallOnce.
Optimize Redis connection usage in collectAndCallOnce.

Since a connection is acquired at the beginning and released once the
function returns, the connection is being borrowed from the pool for
quite some time (duration of the de-duplication and the duration of the
callback function).

This refactor will return the connection as soon as possible to the
connection pool, so it can be re-used by other go-routines.

brocaar/loraserver,brocaar/loraserver