Issue title: proxy_next_upstream配置对使用balancer_by_lua_block后的集群无效
 Issue body: 如下配置,当访问http://116.69.203.115:8800/test2时出现404
`
proxy_next_upstream error timeout invalid_header http_504 http_404;#什么样的错误分发自动重试
proxy_http_version 1.1;
proxy_set_header Connection "";

server {access_log logs/access.log;server_name up_1;listen 8801;
location /test1 {content_by_lua 'ngx.say(ngx.var.server_port,":",ngx.var.uri)';}
}
server {access_log logs/access.log;server_name up_2;listen 8802;
location /test2 {content_by_lua 'ngx.say(ngx.var.server_port,":",ngx.var.uri)';}
}
server {server_name up_0;listen 8800;
	location =/favicon.ico { return 200;}
	location / {
	proxy_pass   http://up_test;
	log_by_lua '
	ngx.log(ngx.ERR,"\nuri=",ngx.var.uri,"upstream_addr:",ngx.var.upstream_addr,"upstream_status:",ngx.var.upstream_status)
	';
	}
}
upstream up_test {
	server 116.69.203.115;   # just an invalid address as a place holder
	balancer_by_lua_block {
		local balancer = require "ngx.balancer"
		local upservers={3,
			{"116.69.203.115",8801},
			{"116.69.203.115",8802},
			{"116.69.203.115",8803}
		}
	local state_name, status_code = balancer.get_last_failure()
 	ngx.log(ngx.ERR,"\nstate_name:",state_name, "status_code:",status_code)
 
	local ibf=require "randombuff"
	local index=ibf.index()--每次递增+1,模拟轮询负载均衡策略
	index=math.mod(index,upservers[1])+2
	local ok, err = balancer.set_current_peer(upservers[index][1], upservers[index][2])
	ngx.log(ngx.ERR,"n\uri:",ngx.var.uri,"index;",index,"ok:",ok, err)
	if not ok then
		ngx.log(ngx.ERR, "failed to set the current peer: ", err)
		return ngx.exit(500)
	end          
	}
	keepalive 10;  # connection pool
}`
如果是如下集群配置则不会404
upstream up_test2 {
	server 116.69.203.115:8801;
	server 116.69.203.115:8802;
	server 116.69.203.115:8803;
	keepalive 10;
}
请问是BUG还是我写法不对呢

 Comments: 
 Comment 0: @onlonely First of all, please do not use Chinese here. This place is considered English ONLY.

Regarding your problem, you should call the `set_more_tries` lua method explicitly:

https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/balancer.md#set_more_tries

{'source': 'GithubIssues', 'repo_name_with_owner': 'openresty/lua-resty-core', 'issue_id': 166021318, 'repo_stars': 699.0}