Backported test_connect_delay.cpp from libzmq