Github-Pull: #8499 Rebased-From: 248f3a76a825a332e5495c5947ad283a9e5e938f
Removes conditional dependency of `src/test` on wallet. Makes multisig and P2SH tests complete without wallet built-in.