Transaction tests

This pull request adds data driven tests for `Transaction`.
It also re-adds `getHash` as an operation on `Transaction`, and moves the constants to the `Transaction` object for public access.