Set a default build type and verify
CMake does not set a default build type but highly recommends always specifying it.
This adds a cmake module setting a default build type (Debug if in a git repo, Release otherwise) and checks that the given build type is valid.