Allow to reuse connections that wait their first request.

This should improve behavior under deficiency of connections.

Since SSL handshake usually takes significant amount of time,
we exclude connections from reusable queue during this period
to avoid premature flush of them.


git-svn-id: svn://svn.nginx.org/nginx/trunk@5115 73f98a42-aea0-e011-b76d-00259023448c
Status: introduced the "ngx_stat_waiting" counter.

And corresponding variable $connections_waiting was added.

Previously, waiting connections were counted as the difference between
active connections and the sum of reading and writing connections.
That made it impossible to count more than one request in one connection
as reading or writing (as is the case for SPDY).

Also, we no longer count connections in handshake state as waiting.


git-svn-id: svn://svn.nginx.org/nginx/trunk@5116 73f98a42-aea0-e011-b76d-00259023448c