Add travis config file and fix errors occurred on travis.

.travis.yml is added.
build tool: CMake
compiler: gcc, clang

At first there were some compiler errors and some test failures on travis, now they are fixed.

gtest, gmock support is not tested.
@terryyin may be working on it.