improve interface for creating Txin and Txout

You shouldn't have to calculate scriptvi by hand when creating a new Txin or
Txout since it can be easily calculated.
allow creating blank scripts