Tests: CMakeLists.txt refactoring
Tests: cmake "make check" target

CMake "make test" target doesn't rebuild test sources.
Added new target "make check" which builds tests and
runs them.