Add skeleton blkstats utility, for scanning raw blocks.

Also, update autogen.sh.
lib/script: properly classify P2SH scripts
blkstats: add several more TX output stats