Fix proxied connections - establish correctly, don't read body.

This change fixes a number of problems which stopped proxied connections
working:

 * We would send "CONNECT / HTTP/1.1", instead of sending the host and
   port, like "CONNECT host:80 HTTP/1.1".

 * We would attempt to read the body following a "200 Connection Established"
   from the proxy, rather than carrying on by sending the actual request.
removed extra trailing lf in multipart form fields
Make sure that the controller process of the socket is the pool process when
the socket is in the pool
Slightly optimize hackney_util:join/3

hackney_util:join/3 was creating an iolist() with unneeded levels of nests.
Merge pull request #39 from mururu/controlling_process

Make sure that the controlling process of the socket is the pool process when the socket is in the pool
Merge pull request #35 from chrisa/fix-proxied-connections

Fix proxied connections - establish correctly, don't read body.
Merge pull request #41 from phonohawk/patch-1

Slightly optimize hackney_util:join/3
Merge pull request #37 from altrg/bugfix/multipart_fields_trailing_lf

Removed extra trailing lf in multipart form fields
Make sure that clients returns the socket to the pool.
sync THANKS
make sure we trasform an iolist to a binary

fix #36
bump to 0.5.0
update doc
add hackney:controlling_process/2 function

This functions allows you to pass a context to a new process easily
without relying on the opaque structure of a #client{} record.
my eyes were hurting
support "Expect: 100-continue" header

When the header is set the body is only sent if the server answer with a
100 continue status. In other case `hackney:stream_body/2` and
`hackney_multipart:stream/2` return {stop, Client}. When the body is not
streamed Hakney takes of this header and only send it if needed.

This changes allows you to received immediately the server errors and
allows you don't send the body for nothing.

More info about this header:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3
stream multipart: if already waiting on the response, return the client
fix expectation when the remote doesn't reply with a continue header
typo
add support for asynchronous response in hackney

Ex:

Url = <<"https://friendpaste.com/_all_languages">>,
Opts = [async],

LoopFun = fun(Ref) ->
    receive
        {Ref, {status, StatusInt, Reason}} ->
            io:format("got status: ~p with reason ~p~n", [StatusInt,
                                                          Reason]),
            loop(StreamRef);
        {Ref, {headers, Headers}} ->
            io:format("got headers: ~p~n", [Headers]),
            loop(StreamRef);
        {Ref, done} ->
            ok;
        {Ref, Bin} ->
            io:format("got chunk: ~p~n", [Bin]),
            loop(StreamRef);

        Else ->
            io:format("else ~p~n", [Else]),
            ok
    end.