rpc: Allow shutdown while in generateblocks
rpc: Allow shutdown while in generateblocks

By checking the shutdown flag every loop we can use the entire nonce space
instead of breaking every 16 bits to check the shutdown flag.

This has been possible since the shutdown flag was switched to an atomic,
before that change it was controlled by a condition variable and lock.

DigitalPandacoin/pandacoin,peercoin/peercoin,DigitalPandacoin/pandacoin,peercoin/peercoin,DigitalPandacoin/pandacoin,DigitalPandacoin/pandacoin,peercoin/peercoin,DigitalPandacoin/pandacoin,DigitalPandacoin/pandacoin,peercoin/peercoin,peercoin/peercoin,peercoin/peercoin