cancel the probe request when the server is freed, and ignore cancelled probe callbacks
remove redundant DNS_ERR_CANCEL check, move comment
Merge pull request #52 from ghazel/20_evdns_probe

cancel the probe request when the server is freed, and ignore cancelled probe callbacks
Merge remote-tracking branch 'origin/patches-2.0'
Refactor event_persist_closure: raise and extract some common logic
If time has jumped so we'd reschedule a periodic event in the past, schedule it for the future instead

Fixes an issue reported on libevent-users in the thread "a dead
looping bug when changing system time backward". Previously, if time
jumped forward 1 hour[*] and we had a one-second periodic timer event,
that event would get invoked 3600 times.  That's almost certainly not
what anybody wants.

In a future version of Libevent, we should expose the amount of time
that the callbac kwould have been invoked somehow.

[*] Forward time jumps can happen with nonmonotonic clocks, or with
clocks that jump on suspend/resume.  It can also happen from
Libevent's point of view if the user exits from event_base_loop() and
doesn't call it again for a while.
Merge branch '20_periodic_event_overload_v2' into patches-2.0
Merge remote-tracking branch 'origin/patches-2.0'
Shave 700 msec off the persistent_timeout_jump test
Split long lists in Makefile.am into one-item-per-line
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.
Generate event-config.h with a single sed script

This approach should make the creation of the file more atomic, to
fix a bug reported by Dinh.

This patch has one change from Zack's original version: it avoids
$<, since Dave Hart tells me he thinks that's not so portable.

(commit message by nickm)
Merge remote-tracking branch 'origin/patches-2.0'