Fix reinit of fds with EV_WRITE but not EV_READ.

Bugfix on 2.1.1-alpha.
Avoid racy bufferevent activation

The evhttp_send_reply method invokes evhttp_write_buffer with a
callback that may release the underlying request object and
bufferevent upon completion. This cleanup callback is invoked by the
underlying bufferevent's write callback. Improperly enabling write
events before referencing the bufferevent could lead to use after free
and memory corruption.
Merge remote-tracking branch 'origin/patches-2.0'
rpcgen: Generate regress.gen.[c,h] in build rather than src dir

Currently an out-of-tree build will either write to the src dir or reuse
the existing regress.gen.[c,h].  But if building from a read-only git
tree (or if the git dir is cleaned), these files will not exist and the
build fails.  So write the files to the build dir.  If the system does
not have python, the regress.gen.[c,h] will be used from the src dir if
they exist.
Merge remote-tracking branch 'rosslagerwall/tree-build'
Fix a compiler warning when checking for arc4random_buf linker breakage.

Patch by Ralph Castain.
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
	evutil_rand.c
Fix another arc4random_buf-related warning
Merge remote-tracking branch 'origin/patches-2.0'
add a http default content type option
regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset
Merge pull request #80 from azat/tests-add-event-debug-logging-all

regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset
Merge remote-tracking branch 'origin/pr/79'
Tweak indentation
http: implement new evhttp_connection_get_addr() api.

Basically tcp final handshake looks like this:
    (C - client, S - server)
    ACK[C] - FIN/ACK[S] - FIN/ACK[S] - ACK [C]

However there are servers, that didn't close connection like this,
while it is still _considered_ as valid, and using libevent http layer
we can do requests to such servers.

Modified handshake:
    (C - client, S - server)
    ACK[C] - RST/ACK[S] - RST/ACK[S]

And in this case we can't extract IP address from socket, because it is
already closed, and getpeername() will return: "transport endpoint is not connected".
So we need to store address that we are connecting to, after we know it,
and that is what this patch do.

I have reproduced it, however it have some extra packages.
(I will try to fix it)
https://github.com/azat/nfq-examples/blob/master/nfqnl_rst_fin.c
regress_http: add tests for evhttp_connection_get_addr()
Merge branch 'pr_81'