[CMAKE] Get rid of `add_compiler_flags_to_var`
[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

ftrader-bitcoinabc/bitcoin-abc,cculianu/bitcoin-abc,cculianu/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,cculianu/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,cculianu/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc