Refactor transaction class


* Refactor transaction into a different subfolder
* Added a lot of tests for sighash and transaction serialization (from
  reddit's and Ryan X. Charles' `fullnode`)
* Drop "only" from sighash tests and consolidate logs
why not split the complex signature object into three parameters: `signature`, `sigtype`, and `publickey`?

In fact, I would do it in this order:
`function(publicKey, signature, sigtype)`
with signature and sigtype being optional. The reason is: you may want to create the input without knowing the signature yet. And the sigtype can default to `0` if it's not there.