handle SIGHASH_SINGLE in signature_hash_for_input

  with SIGHASH_SINGLE added, sign_input_signature now supports all hash_types.

  fun note: 7208e5edf525f04e705fb3390194e316205b8f995c8c9fcd8c6093abe04fa27d is
  actually hash_type: SIGHASH_SINGLE|SIGHASH_ANYONECANPAY => 131