Primecoin: Fix mining code crashes when doing a -reindex.

GeneratePrimeTable() was not called when starting with the -reindex option.
Check that pindexBest is not NULL in BitcoinMiner().
Merge pull request #20 from mhirki/master

Primecoin: Fix mining code crashes when doing a -reindex (mhirki)