Our current IsMine logic does several things with outputs:
- Determine "spendability" (roughly corresponding to "could we sign for this")
- Determine "watching" (is this an output directly or indirectly a watched script)
- Determine invalidity (is this output definitely not legally spendable, detecting accidental uncompressed pubkeys in witnesses)
- Determine "solvability" (would we be able to sign for this ignoring the fact that we may be missing some private keys).
The last item (solvability) is mostly unrelated and only rarely needed (there is just one instance, inside the wallet's coin control logic). This PR changes that instance to use the separate IsSolvable function, and stop IsMine from distinguishing between solvable and unsolvable.
As an extra, this also simplifies the IsMine logic and adds some extra checks (which wouldn't be hit unless someone adds already invalid scripts to their wallet).