Initial version of CMake build system
Use find_package for some libs
Fixes for Gentoo
Don't print warning on cygwin for -pthread
Add APPNAME defines, some other minor improvements
Fix definitions for mfsmount