Feature: upstream dynamic resolve

This is version 1, the "imperfect" version.

Introduces a new directive with two parameters into upstream context:

Directive:
    *) dynamic_resolve: enables dynamic resolving functionality on an upstream.

Parameters:
    *) fail_timeout=time, specifies how long tengine will not launch
       a dns query if the dns server is down.
    *) fallback=action, specifies what action to take if the dns server is
       considered as "down".

Support:
    *) use the first result of a dns response
    *) fail_timeout
    *) fallback action, but the action "stale" is limited to use what tengine gets
       when it parses the configuration

Not Support:
    *) all results from a dns response
    *) ipv6 address
    *) using stale dns data

All "Not support" stuff are now supported in "perfect" version, which
will be released after tengine is upgraded to original nginx 1.6.x
branch.

Test cases are included.

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Bugfix: /etc/resolv.conf parsing error with ipv6.
Merge pull request #496 from lifeibo/master

Bugfix: /etc/resolv.conf parsing error with ipv6.
Merge pull request #495 from InfoHunter/dyn-dns

Feature: upstream dynamic resolve
Bugfix: make test case independent

Use www.taobao.com to replace senginx.test in dynamic_resolve.t

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Bugfix: in ngx_http_upstream_dynamic_module

If fail_timeout is enabled and fallback action is specified
to either "stale" or "next", a segmentation fault would happen.

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Merge pull request #499 from InfoHunter/dyn-dns

Bugfix: in ngx_http_upstream_dynamic_module
Merge pull request #498 from InfoHunter/master

Bugfix: make test case independent
Introduce a built-in variable: $normalized_request

When working with key-value store, such as memcached, we usually use URL
to generate unique key for each object.

But unfortunately, each URL may have several forms, for example:

1) http://abc.com/search?text=Hello+G%C3%BCnter#h1
2) http://ABC.COM/search?text=Hello+G%c3%bcnter#h1
3) HTTP://abc.com/search?text=Hello+G%C3%BCnter#h3

All above froms are refer to the same object. So we have to normalize URL
before generating object key.

As we known, URL syntax looks like:
 <scheme>://<user>:<password>@<host>:<port>/<path>;<params>?<query>#<frag>

The $normalized_request variable is the normalized form of URL, which will:
 - exclude #<frag> part from URL.
 - convert <scheme> and <host> to lower-case.
 - convert all escape characters(%nn) in <path> to upper-case.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
add a random number for round robin.
Merge pull request #500 from taoyuanyuan/robin

add a random number for round robin
add docs for ngx_http_sysguard_module

Chinese and English version.

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
add soreuseport option of socket, this feature come from linux 3.9
(http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=055dc21a1d1d219608cd4baac7d0683fb2cbbe8a).
you can set  "reuse_port on" in event block to open soreuseport option.
add docs for ngx_http_upstream_dynamic_module

English and Chinese versions.

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
fix grammar error in docs

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Merge pull request #509 from monadbobo/reuseport_fixed

add soreuseport option of socket.
Fix doc errors for sysguard and upstream_dynamic

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>
Merge pull request #508 from InfoHunter/master

add docs for sysguard module and upstream_dynamic module
bugfix: ngx_http_upstream_init_process will cause coredump while not have http block.
Feature: the "gzip_clear_etag" directive.