[CMAKE] Fix scope issue in the remove_<lang>_compiler_flags() functions
Summary:
The CMAKE_<LANG>_FLAGS where not propagated to the parent scope.
The configuration specific variables were correctly scoped if a
configuration is defined, which is our default, but invalid if unset.
Test Plan:
ninja check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D4584