Fix IsInitialBlockDownload which was broken by headers first.

Nit: Can you make this lockIbdState or perhaps even lockIBDState to be readable? What do the others think.