Fixes #25150
APS (Avoid Partial Spends) runs a second coin selection pass to fully spend UTXOs sharing a scriptPubKey. This currently runs unconditionally, even when the first selection has no partial spend. Running APS unnecessarily wastes computation and can produce a worse result when there was nothing to fix.
Detect partial spends by comparing selected vs available UTXO counts per scriptPubKey, reusing available_coins. Skip APS if none found.
Test updated to create partial spend scenarios so tracepoints fire.
Supersedes #34362 which was corrupted by a shallow clone force-push.