[CMAKE] Override default flags
Summary:
This is a bit of simplification for setting the default optimization
flags value. The OverrideInitFlags.cmake is loaded at the project()
call and is used to write the CMAKE_<LANG>_FLAGS_<CONFIGURATION> to
the cache.
This allow for removing the NDEBUG flag for release type
configurations, as well as overriding the default CFLAGS for the debug
configuration.
This is a first step toward refactoring the compilation flag assignment.
This does not change the current behavior.
Test Plan:
ninja check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D4765