An improved patch.

1. Added check that previous tx was good. Otherwise, while bad tx is rejected, bad on top of bad would be accepted, since the name matches.
This however degrades the performance slightly (additional access to name db).

2. Renamed nameindexfull.dat to nameindex.dat. Hopefully this would fix the rescan crash issue of the previous commit.
nameindex.dat was used in some older version though. When we agree the patch is final, we should rename to e.g. namedb.dat and make another commit.