replaced custom Makefile with cmake
use boost cmake module
depend on system pthread library
add more compiler warnings and support mingw
ignore makefile since it is generated