rpc: Push down safe mode checks
Summary:
This contains most of the changes of 10563 "remove safe mode", but doesn't
remove the safe mode yet, but put an ObserveSafeMode() check in
individual calls with okSafeMode=false.
This cleans up the ugly "okSafeMode" flag from the dispatch tables,
which is not a concern for the RPC server.
Extra-author: Wladimir J. van der Laan <laanwj@gmail.com>
This is a backport of Core PR11179
Test Plan:
make check ./test/functional/test_runner.py
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1917