add toAddress and getOutType tests to script
script.toAddress -> script.getToAddress
add (some) fromAddress and getInType tests to script
add tests and refactor wallet.processTx