Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true.
Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true.

(cherry picked from commit 9ec75c5ef4182a38e261beaafdc94325785cc7c5)

# Conflicts:
#	src/main.cpp

reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin