Remove possibility of divide by zero as active becomes 0

The old code '(current + 1) % active' implies an integer divide by active,
with no guard to prevent active becoming zero in the zmq io worker thread.

NOTE WELL:
This change only addresses the divide by zero error, and does not address
any other issues associated with accessing the last pipe after it has been
terminated.