Initial attempt at port to libevent; still bugs, probably with the
flags and callbacks
Introduced Find LLVM/Clang cmake files and some changes to cmake to
allow for FAM+libevent (for a port to Cygwin)
Fixed terrible nullptr passed as userdata to libevent callback that
was causing a crash when callbacks fired.  Now things are starting to
work but trying to send a compile file request segv's
Today's updates and debugging read returning 0 issues
Still debugging problems...
Unregister the oneshot timer on connection finish that was causing
segv if the timer fires after it's already been disposed of
Changed the event loop dispatch options that was eating 100% CPU
Make Thread use std::thread and kill stack size
Don't finish connections multiple times
Add some asserts in SocketClient
Add some logging to /tmp/... in SocketClient.

Export RTAGS_DUMP in shell to use.
No more using
Don't double delete connection.
We never get a disconnected signal from the socket client if we close
it. Not sure if we should but someone needs to tell the outside that
we're gone or we will never die.
Working on CYGWIN!!!

Temporary hack/fix on EventLoop unregisterTimer() that appears to be
related to calling event_del on a timer that is a one shot timer.
event_free() appears to be enough; but I left some useless fluff in to
be removed later

Also changed FAM's change event spam messages to console
Fixed up memory leak issues (as reported by valgrind) in/EventLoop 's
usage of libevent
Changed EventLoop to use a single map structure for both timers and
sockets, along with a single callback interface (timers are wrapped
with lambdas to ignore the fd arg).

Changed Connection back to using callLater() instead of the 1ms
EventLoop timer.
Use pkg_check_modules to find libevent inside CMakeLists.txt

Removed annoying debug message for dispatch
Big mistake/correction - forgot my increment operation on the id's in
generateId()
Super hacky garbage attempt at handling OneShot events (removing and
freeing them).  Works on and off so far, but I've seen a SEGV on quit.

TODO: Investigate and fix or revert ASAP