last changes to fix tests
Make building the tests optional.
Make gtest build with shared crt by defaul. It would be better to do this in one of our own CMakeLists instead of google's but I couldn't figure out how.