Fix building of tests
Fix handling of very fast CURLHandle connections
This is most likely to happen while running the unit tests against mock server!