Fix of separate pool for upstream connections (r4117).

Pool may not be created if connection was created but rejected in connect()
call.  Make sure to check if it is here before trying to destroy it.
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index d3d433b..ef16a66 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2922,7 +2922,10 @@
         }
 #endif
 
-        ngx_destroy_pool(u->peer.connection->pool);
+        if (u->peer.connection->pool) {
+            ngx_destroy_pool(u->peer.connection->pool);
+        }
+
         ngx_close_connection(u->peer.connection);
     }
 
@@ -3017,7 +3020,10 @@
                        "close http upstream connection: %d",
                        u->peer.connection->fd);
 
-        ngx_destroy_pool(u->peer.connection->pool);
+        if (u->peer.connection->pool) {
+            ngx_destroy_pool(u->peer.connection->pool);
+        }
+
         ngx_close_connection(u->peer.connection);
     }