[CMAKE] Get rid of add_compiler_flags_to_var
Summary:
The last callsite is in the check_linker_flags function. Adding the
logic at the callsite allow to remove this function from the API.
There is no change in behavior.
Depends on D4961.
Test Plan:
ninja check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5002