Name bug fix.
Hard-fork is set to happen at block 150000 (~76 days from now). Before that bad name_* transactions are allowed, but won't be processed (i.e. won't be saved to name DB). After that they will be rejected, as well as blocks containing them.

At first start nameindexfull.dat will be rescanned (slow - be patient). If something goes wrong, delete it to force another rescan.
nameindexfull.dat is checked by version (rescanned if below 0.3.72).
Small amendment to the code, otherwise won't compile.
Making constructor/destructor of CDB public, so init.cpp can check name DB version without dependency on namecoin.h.
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.
An important update to the patch.
If you upgrade from the previous commit, please delete nameindex.dat to force rescan.
There are some additional checks that hurt the performance slightly. We can remove some of them after the hard-fork (150000), if the chain happens to be consistent under a simple set of rules. This is because rules are "transitional" to avoid network fork right now. After the hard-fork we can remove them or simplify to minimal rules that validate the chain up to the block 150k correctly.
I took some minor improvements to ReconstructNameIndex from cjdelisle's patch (full patch still crashes for me for some reason, so I do not merge it for now). Thus if you merge my commit on top of his patch, there may be a few conflicts. Sorry for inconvenience.
Merge branch 'namecoin-qt-snailbrain' into namecoin-qt