Clean up CMakeList.txt files

Set CXX Flags instead of C Flags, properly delete java class files on
make clean, fix compiler warnings of -Wall -Werror -pedantic