Revert "Major enchancement to network part. One bug when running with multiple peers: when one looses connection, this automatically trigs the other network connections to fail - however they instantly reconnect. This has probably something to do with syncronize-barriers when adding data to send buffer."

This reverts commit 45114bd8b5c1b24adc906fdbf2536e1ed2b6f3b2.
Revert "Revert "Major enchancement to network part. One bug when running with multiple peers: when one looses connection, this automatically trigs the other network connections to fail - however they instantly reconnect. This has probably something to do with syncronize-barriers when adding data to send buffer.""

This reverts commit d9a8667e183b4caa46d3b7d6cf5bc7c7d43ea2b7.