Fixes deadlock for large amount of crypto operations

The channel used for communication with the crypto thread would sometimes be overwhelmed by the amount of messages sent back and forth. Since the receive rate on both sides (Node and crypto threads) was lower than the insertion rate, sometimes a deadlock would occur with Node thread unable to insert more messages and crypto thread unable to receive them, since it would hang on inserting some more responses, which would not be received by the Node thread. Classic example of a deadlock. Apparently, the HWM socket option of ZMQ would not suffice to handle this case, therefore a manual removal of all unread messages from crypto thread in a loop has been added. Also, modified crypto thread so that it is also possible to edit HWM option of the communication sockets.