A followup to #8992 which includes a number of additional changes.
The only addition of data to wallets is done in importprivkey with the normal IsWitnessEnabled
and -prematurewalletwitness
gating.
I can write up tests for these if I get concept ACKs.
I wrote and manually tested these by turning on p2sh-p2wpkh by default via getnewaddress, and seeing what failed. Rest of failures seem to involve no-witness-yet
and related sigop counting errors.