test: fix bufferevent/bufferevent_connect_fail_eventcb* under osx/freebsd For OSX the socket should be closed, otherwise the "connection refused" will not be triggered. And freebsd can return error from the connect(). (cherry picked from commit 30fe125041ab38045487bd3af60d2f564dffc81c)