Free/Net/OpenBSD have another names for libevent2 headers.
Add #ifdef / #else / #endif to include correct headers.
listen on unix socket for local connection
Improve unix socket related code.
Merge pull request #39 from yason/master

Free/Net/OpenBSD have another names for libevent2 headers.
[build] add cmake build system

 - add missing includedir for cmake
 - remove shared library version
 - python support
Resolve pidfile resource leaks

This patch resolves resource leaks caused by not closing the file streams upon
an write error.
[lib] removal of unused code
[build] correct sed usage
[build] fix bus error while execute make -jN (N>1)
[build] fix the missing inclusion of config.h
[lib] add support for BSDs