Split out time-related evutil functions into a new evutil_time.c
Split out time-related prototypes into time-internal.h
Refactor monotonic timer handling into a new type and set of functions; add a gettimeofday-based ratcheting implementation

Now, event.c can always assume that we have a monotonic timer; this
makes event.c easier to write.
Add EVENT_PRECISE_TIMER environment var for selecting precise-but-slow timer
Implement fast/precise monotonic clocks on Windows

This uses code from libutp, which was released under the MIT
license; see evutil_time.c and LICENSE changes.
Simple unit tests for monotonic timers
Improve the monotonic-time unit test: make it check the step size
When PRECISE_TIMERS is set with epoll, use timerfd for microsecond precision

The epoll interface ordinarily gives us one-millisecond
precision, so on Linux it makes perfect sense to use the
CLOCK_MONOTONIC_COARSE timer.  But when the user has set the new
PRECISE_TIMER flag for an event_base (either by the
EVENT_BASE_FLAG_PRECISE_TIMER flag, or by the EVENT_PRECISE_TIMER
environment variable), they presumably want finer granularity.

On not-too-old Linuxes, we can achieve this using the Timerfd
mechanism, which accepts nanosecond granularity and understands
posix clocks.  It's a little more expensive than just calling
epoll_wait(), so we won't do it by default.
If a higher-priority event becomes active, don't continue running events of the current priority.

Bug found by Ralph Castain.
Fixed potential double-readcb execution with openssl bufferevents.

the function do_read() will call SSL_read(), and if successful, will
call _bufferevent_run_readcb() before returning to consider_reading().

consider_reading() will then check SSL_pending() to make sure all
pending data has also been read. If it does not, do_read() is called
again.

The issue with this is the possibility that the function that is
executed by _bufferevent_run_readcb() called
bufferevent_disable(ssl_bev, EV_READ) before the second do_read(); In
this case, the users read callback is executed a second time. This is
potentially bad for applications that expect the bufferevent to stay
disabled until further notice. (this is why running openssl bufferevents
without DEFER_CALLBACKS has always been troublesome).
Work-around a stupid gcov-breaking bug in OSX 10.6

This only affects the unit tests.

Fix found at http://rachelbythebay.com/w/2011/07/12/forkcrash/

(Backport from 2.1)
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
	bufferevent_openssl.c
Merge remote-tracking branch 'github/20_active_prio_inv' into patches-2.0
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
	event.c
Merge branch '21_robust_monotonic'
Correctly handle running on a system where accept4 doesn't work.

Previously, we treated EINVAL as the only errno that indicated a
broken accept4.  But EINVAL only appears when one of the SOCK_*
options isn't supported.  If the accept4 syscall itself isn't there,
we'll get an ENOSYS.

Reported by Azat Khuzhin.
dns-example.c can now take a resolv.conf file on the commandline
Make some evdns.c debug logs more verbose
When retransmitting a timed-out DNS request, pick a fresh nameserver.

Otherwise, requests initially sent to a failing nameserver would
stay there indefinitely, even if other nameservers would work.

Fix for sourceforge bug 3518439
Fix evdns build with threads disabled

The last evdns change apparently broke it, by using a "base"
variable that we were only declaring with threads turned on.