test (kqueue)connection completely in ngx_http_upstream_test_connect()

With NGX_HAVE_KQUEUE option, ngx_http_upstream_test_connect() may return
NGX_OK although the connection isnt established.

Reproduce the problem in os x 10.8.4, let backend server down, then
tengine upstream try to connect and send request to it:

ngx_http_upstream_init_request()
'-> ngx_http_upstream_connect()
    '-> ngx_event_connect_peer() returns NGX_AGAIN           <<< cannot connect
    '-> ..
    '-> ngx_http_upstream_send_request()
        '-> ngx_http_upstream_test_connect() returns NGX_OK  <<< wrong value
	'-> ngx_output_chain() returns NGX_AGAIN

With this patch, ngx_http_upstream_test_connect() will call getsockopt
to test connection still after it thinks kqueue connection is ok.

Without this patch, tengine can work well because c->recv() will return
NGX_ERROR when read event timedout expires.

Note that nginx has the same problem.
Merge pull request #296 from chobits/kqueue_test_connect

test (kqueue)connection completely in ngx_http_upstream_test_connect()