added proxy_upstream_tries directive

proxy_upstream_tries can limit proxy_next_upstream retry times. This directive can work in main/server/http/location config, and is disabled by default(default behavior is to try ALL upstreams). Partial code is
forked from patch: https://gist.github.com/shai-d/5446961.