Implement pruning of nameindex.

This patch finishes the implementation of nameindex pruning.  To perform it, use `prune_nameindex DEPTH` (similarly to `prune_gamedb`).  DEPTH should be chosen larger than an expected reorg, since a reorg will fail when it happens beyond the pruning point.

The information removed is still something that can be re-created locally by removing `nameindexfull.dat` and letting the client rebuild it (slow!).  Pruning with a depth of 100 results in `nameindexfull.dat` being reduced from 1.8 GiB to only 450 KiB (!) for me.

Please test thoroughly - it works so far on my VPS (including my gathering bots on testnet) and I've also tried reorgs on a private testnet, but still more tests should be good before merging.