Add libevent abstraction layer

This pull request adds an abstraction layer for `libevent` that allows us to override the implementation of libevent functions to simulate errors. It also adds tests that take advantage of such feature.

While testing this pull request, I noticed (and [fixed](https://github.com/bassosimone/libight/commit/708550f469bcc0132b209681d380acc949e13aa0)) a really interesting bug: global variables are not initialized (i.e., their constructor is not called) when we compile `libight` in static mode (i.e., `./configure --disable-shared`). See [stackoverflow](http://stackoverflow.com/questions/9459980/c-global-variable-not-initialized-when-linked-through-static-libraries-but-ok) for more on that.