Refactor decoder

Pull lexer-type code into decoder.rs, greatly simplify the parser
state machine. (You can actually read it now and tell what it does!)

THIS CURRENTLY BREAKS RUST HEAD
Workaround rustc bug, fix typos in refactored transaction parser

As a workaround the lexer accepts a VecIterator explicitly, even
though it works with the interface of a generic Iterator. (I can't
get the casts to work properly when accepting an Iterator, see
rust bug #10955).

Also this commit fixes the transaction parser, since I am able
now to compile and test it. All good, only minor typos (read
nValue as 4 bytes instead of 8, fencepost errors in input-count
and output-count).

The parser code is still a bit repetitive, but I think I need the
Rust macro system to stabilize in order to do anything about that.