Add USE_LOGCACHE and USE_LOGSUMARRAY options to cmake
Try to fix gtest compilation on CYGWIN (issue #1418)