Fix IsInitialBlockDownload which was broken by headers first.

> With this proposed code, if the network goes 24 hours without a block (uh what?) everyone running this will stop mining. :P

Arguably, we should never stop mining whatever happens. During a run of Bitcoin Core we should never go from `!IsInitialBlockDownload()` to `IsInitialBlockDownload()`. That just doesn't make sense, so we can add a check to prevent it.