Handle bad input in sighash single.

The bitcoinj test suite actually uses it (the only thing i've seen that
does). Specifically it uses it with a bad input which returns a hash of
1.
gofmt.