Fix collectagent anomalous behaviour when pushers terminate abruptly
When a DCDB pusher terminates abruptly (without flushing the queues and properly closing its connections) the collect agent may enter a "frozen" state (likely caused by corruption in the input MQTT message queue) in which no further MQTT messages are processed and pushed to the Cassandra database, even if new pushers connect. To restore normal functionality, the collect agent must be restarted.
MQTT messages are correctly sent by the pusher to the collect agent, but they are not correctly parsed and are therefore discarded (the collect agent will often show "message malformed" or "wrong mqtt topic format" messages).
The appearance of this anomalous behaviour is not deterministic, but depends on the amount and frequency of pushed sensors, resulting more frequent (roughly 40% probability at each pusher termination) when 2000+ sensors are pushed at each second. This bug mainly occurs when pushers are terminated without cleanup, but it has been observed once even in case of proper termination (under the SIGINT signal).