This PR renames OutputType::LEGACY to OutputType::PKH, OutputType::P2SH_SEGWIT to OutputType::P2SH_WPKH and OutputType::BECH32 to OutputType::WPKH in order to be consistent with the terminology used in Output Descriptors and in order to more accurately describe what the current wallet uses.
It introduces two new OutputTypes P2SH, P2SH_WSH and WSH to distinguish legacy P2SH from SegWit wrapped P2SH, and to distinguish SegWit Pay-to-Public-Key from Pay-to-Script-Hash.
Finally it adds GetAddressType() to Descriptor, which returns the reintroduced (#12729) OutputType::NONE for descriptors that we currently can't convert to an address (pk(...), raw(), etc), those whose address we don't interpret (addr()) and the quirky combo().
This allows a future descriptor based wallet (e.g. #15487) to find the correct descriptor for a given -addresstype and -changetype setting when generating new addresses. Similarly it allows importing the appropriate descriptor from a hardware wallet (e.g. #14912).