Merge pull request #736 from braydonf/feature/to-object

Added `toObject` methods to return an `object` and modified `toJSON` to return a `string`. Closes #732
Fixed bug, toObject should use other object's toObject
Added test to check that Transaction fromJSON could initialize from toJSON, and fixed a bug.
Transaction: Use Script toString for transaction JSON output