Introduce RPC to the framework of nginx channel

Add NGX_CMD_RPC command to nginx channel framework, so that workers
can request each other to execute self-defined RPC.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Indroduce lockfree stack into core library

With the help of lockfree stack, we can be easy to implement
lockfree algorithm when working on shared memory.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Add "ngx_process_idx" global variable for worker processes

It's useful to use "ngx_process_slot" as index to fetch worker's
private data in shared memory.

But unfortunately, the value of "ngx_process_slot" among all workers
could become inconsecutive when nginx was reloaded or crashed.

This patch will add "ngx_process_idx" global variable for nginx,
the value of "ngx_process_idx" will be in range [0, (N-1)], where
N is the number of woker processes, of course it'll always be
consecutive, so can be used as index safely.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
In order to limit the number of connections for each upstream, it's
worth to share keepalive connections across all workers, so that idle
connections could be reused effectively by other workers.

* Features:
  - All operations on shared memory are lockfree, workers will hardly
    ever block each other.

  - To get idle keepalive connection from worker's local pool firstly,
    which could avoid unnecessarily transferring socket fd between workers.

  - Add "shared" option for upstream's "keepalive" directive. We can use
    this option to enable shared keepalive connections:

        http {
            upstream abc {
                ...;
                keepalive n shared;
                ...;
            }
        }

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>