change which proxy as reported as being failing
with the previous logic, if proxies were being used and connection
to the first failed, 0 was reported, but 0 was also reported if the
connection between the first and the second failed. -1 was reported
if no proxies were used at all.
now always the number of the proxy to which the connection fails
is reported, and -1 if the last hop (i.e. the connection to the target)
failed.
so if the connection between proxy 0 and 1 fails, 1 is reported as
failing. this allows to accurately remove dead proxies from a chain.