Fix googletest inclusion (#3398)

The googletest root CMakeLists.txt now sets a GOOGLETEST_VERSION variable, which is needed by the subprojects. Use add_subdirectory(external/googletest EXCLUDE_FROM_ALL) to add the root CMakeLists.txt file, which by default builds GMock. We already use EXCLUDE_FROM_ALL, which should shield us from e.g. building their tests, etc. If this causes issues in the future, we can change the googletest CMakeLists.txt file to only mess with compiler settings etc. if it is the root build.
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 56dd54f..5b34159 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -47,7 +47,7 @@
   if (TARGET gmock)
     message(STATUS "Google Mock already configured")
   else()
-    set(GMOCK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest/googlemock)
+    set(GMOCK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest)
     if(EXISTS ${GMOCK_DIR})
       if(MSVC)
         # Our tests use ::testing::Combine.  Work around a compiler