poller: don't use deprecated libevent code

This boils down, basically, to use event_base_new() and
evdns_base_new() to construct our own base objects.

I moved the code to setup the SIGINT handler in loop() because
the constructor should only create stuff.

While there, make sure that we don't ignore the return value
of event_base_dispatch() and event_base_loopbreak().
poller: don't always register a SIGINT handler

A library should provide mechanism, not implement policy. To break
on SIGINT is policy. It would be mechanism to allow the library user
to register a callback to handle SIGINT.

Since we don't plan to handle SIGINT on Android, this functionality
seems to be only needed for implementing test programs.

Therefore, do not bother with writing the policy and only provide
the minimum functionality needed for a test program.

In particular, this diff moves the code to register and unregister
the SIGINT handler into the `break_loop_on_sigint_()` method.

I've given this method a name terminated by underscore to stress
that it's not meant to be used outside of testing programs.

For the same reason, I've not added a `ight_break_loop_on_sigint()`
top level function to libight.
poller: fail, rather than abort, DNS requests on exit

Maybe this is just paranoia, but I'd rather fail than abort
the pending DNS requests.

Let's assume that there is a class that saves a pointer to
a pending DNS request, or NULL if the request completed.

In this scenario, suppose that the poller is destroyed and
then the destructor of such class is run.

If the DNS request was aborted in the poller, the class has
no way to know that its pointer is no longer valid.

Conversely, if the request is failed in the poller and the
class is correctly written, the DNS callback is invoked and
the class has a chance to NULL its pointer.
poller.h: describe use case for break_loop_on_sigint_()
Rewrite IghtPoller::IghtPoller() w/o using goto

Yesterday I privately discussed with @hellais a number of ways to
avoid using the `goto` statement in IghtPoller().

Of the many solutions discussed, this one is the one that adds
less code bloat (it actually shrinks the file).
Merge pull request #13 from bassosimone/dont-use-deprecated-libevent-code

Don't use deprecated libevent code