Prevent segmentation violation upon primecoind exit

If primecoind is generating coins, then the following
segmentation can/will occur in a mining thread

Core was generated by `./primecoind'.
Program terminated with signal 11, Segmentation fault.
    (this=0x7f3a64000d20) at prime.cpp:552
552	        unsigned int nPrime = vPrimes[nPrimeSeq];

However, in thread number 2, it calls exit(), which calls
atexit() / on_exit() handlers. boost etc calls OpenSSL
shutdown handlers, which seems to cause the unmapped
memory getting hit above (due to bignum free being called
).

The fix is to call GenerateBitcoins(false, NULL) which
causes the mining threads to exit, and allows clean
shutdown.

(Tips welcome, ARhURiSGy9NMiXQr2Q9h3AL8qPntcsSKkF :D)
Merge branch 'master' of https://github.com/primecoin/primecoin