[CMAKE] Split remove_compiler_flags into C and CXX variants
Summary: Keep a remove_compiler_flags macro that does both.
Test Plan:
mkdir buildcmake && cd buildcmake cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo ninja -v
Check the -DNDEBUG does not appear on the compiler command lines.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2655