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