This diffs overrides the default flags for the `Debug` build type,
setting the optimization to `-g3 -Og` (or their fallbacks) and adding
defines for `DEBUG` and `DEBUG_LOCKORDER`.
This allow the use of `cmake -GNinja -DCMAKE_BUILD_TYPE=Debug` as an
equivalent to `configure --enable-debug`.
Depends on D2651