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.
Fix a compiler warning when checking for arc4random_buf linker breakage.

Patch by Ralph Castain.
Fix another arc4random_buf-related warning
Avoid redundant invocations of init_extension_functions for IOCP
update the 2.0 changelog
Clarify event_base_loop exit conditions
Typo fixes from Linus Nordberg
Typo fixes from Linus Nordberg
Merge remote-tracking branch 'sourceforge/patches-2.0' into patches-2.0

Conflicts:
	include/event2/event.h
Check does arch have the epoll_create and __NR_epoll_wait syscalls.

Some architectures (like AArch64) do not have deprecated syscalls.

Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
bufferevent_pair: don't call downcast(NULL)
Add -Qunused-arguments for clang on macos

The clang compiler provided with macosx emits warnings like:

  CC       bufferevent.lo
clang: warning: argument unused during compilation: '-I .'
clang: warning: argument unused during compilation: '-I ./compat'
clang: warning: argument unused during compilation: '-I ./include'
clang: warning: argument unused during compilation: '-I ./include'

for each file being compiled. This generates a lot of noise during
compilation making it hard to see "real" errors. This patch mute
those warnings.
Fix a crash in evdns related to shutting down evdns

Patch from YASUOKA Masahiko; fix for libevent github issue #113.
Fix a crash in evdns related to shutting down evdns

(Improved version to deal correctly with probe requests)

Patch from YASUOKA Masahiko; fix for libevent github issue #113.