During a large reorg, the number of blocks kept in memory could grow to be very large. This change makes it so that only the last 10 blocks are kept in memory, and if necessary, older blocks are re-read from disk.
Also introduce a parameter to FlushStateToDisk to ensure that we do not try to prune during the life of a ConnectTrace, because we might need to re-read the block from disk.