implement duplex cosocket

This patch only includes the duplex-cosocket implementation and a test case '127-tcp-socket-duplex.t'. 

So read/write the some cosocket in different coroutines(threads) will work fine, and with the help of duplex-cosocket some openresty components such as 'websocket' will be easier to use.

I've noticed that more than one developers are waiting for this feature and there's already a pull request https://github.com/openresty/lua-nginx-module/pull/290 committed by @aviramc, and @blablacio's https://github.com/blablacio/lua-nginx-module, Unfortunately, No patch passed the test case '127-tcp-socket-duplex.t'.

The following is discussing posts all I know about duplex cosocket:
* https://github.com/openresty/lua-nginx-module/issues/241
* https://github.com/openresty/lua-nginx-module/pull/290
* https://groups.google.com/forum/#!topic/openresty-en/I5o9QlVmZqo
* https://groups.google.com/forum/#!topic/openresty/y0GECHvHyG8
* https://groups.google.com/forum/#!topic/openresty/H-L8mhldNXM
* https://groups.google.com/forum/#!topic/openresty/ETkdfeDnV50