fix hex payload endianness in generate_tx.rb example
block and tx parsing speedup

  benchmark results parsing last 3000 blocks: 360 down to 50 seconds!

  switch to using io streams (with read, pos and seek) instead of creating lots of new string with `field, buf = buf.unpack("Ia*")`

  keep the backwards compatible methods for now and remove them at some point.
fix parsing for invalid opcode testnet3 scripts

  first found in testnet3 block 0000000000ac85bb2530a05a4214a387e6be02b22d3348abc5e7a5d9c4ce8dab transactions

  all testnet3 blocks below include the same invalid opcode testing scripts with increasing size.

  json serialization roundtrip takes really on after 250kb, parsing with serialization is fast though.

  0000000000ac85bb2530a05a4214a387e6be02b22d3348abc5e7a5d9c4ce8dab (block 54503) 40.699 kilobytes
  00000000003ba174fd77250a04eba0e15134da0b4edfb9996bfedffdd235f97c (block 54504) 250.36 kilobytes
  00000000005991f9f4a17b344907af42ae5e785b6c7e0943a50cdb2975eeb746 (block 54507) 998.36 kilobytes
  0000000001725caeac94b12c99a303a83fa987980700cc7a3b6dd472eb5f0d82 (block 54508) 999.36 kilobytes

  also parsing Script.new("\xff\xff\xff") breaks with `bitcoin-ruby/lib/bitcoin/script.rb:145:in `|': can't convert nil into Integer (TypeError)` - fixed now.
don't exit on mismatching checkpoint when block isn't current head

prevents occasional crashes when we receive an invalid block at a low height
command client: don't autostart server, increase reconnect interval
cleanup logging
cleanup default storage location to take into account different networks