Find libevent through pkg-config
Fix build using i686-w64-mingw32

This commit fixes some header file and library name casing mistakes,
and explicitly links in libpthread where necessary.
Make Python bindings actually optional