Add `make check' in cmake build

cmake does not auto build test program when using `make test' [1]. It
causes some problem because developer might test the old code instead of
the latest one. In order to avoid such issue, a new target called `make
check' is added to cmake [2].

[1] http://stackoverflow.com/questions/733475/cmake-ctest-make-test-doesnt-build-tests
[2] http://www.cmake.org/Wiki/CMakeEmulateMakeCheck
Remove chewing_Init and chewing_Terminate
Remove trailing white spaces
Fix warning