Idea from Satoshi to improve/automate the -rescan feature:
Whenever a new block is accepted, the best block pointer is updated in blkindex.dat. If you also record it in wallet.dat (as a CBlockLocator), then on startup, if wallet's last seen best block is further back than blkindex.dat's, it should rescan starting from there.