Fully rewrite txindex on upgrading blkindex.dat format.

When upgrading the blkindex.dat data format, actually fully rewrite the
txindex objects stored in it.