Transaction.verify: make it throw VerificationException subclasses, and add a check for duplicated outpoints.

This check does not have any impact on existing apps as in full verification mode the UTXO set is already effectively performing this check, and general SPV wallets don't verify inputs meaningfully anyway (they could just be random). However it's useful for Lighthouse and can't hurt - a tx with a duplicated outpoint is always invalid.