configure: Try to find libev with pkg-config

Some distributions (like Fedora) ship a .pc file for libev, and move its
include to /usr/include/libev. This patch makes configure try to use
pkg-config first to find libev (setting the correct CFLAGS and LIBS if
that succeeds), before falling to the previously used AC_SEARCH_LIBS.

Signed-off-by: Arnaud Fontaine <arnau@mini-dweeb.org>
Put unagi includes before system ones

libev also ships a file called event.h, which conflicts with the one
in unagi's include dir. Put unagi's include folder first to ensure we
pick the right one.