Add throughput stats.
Make sure to close the msg before returning errors.
Add support for zeromq 4.x