refactor: add thread safety lock assertion to WriteBlockIndexDB()
refactor: add thread safety lock assertion to WriteBlockIndexDB()

The new helper function, BlockManager::WriteBlockIndexDB(),
has a thread safety lock annotation in its declaration but is
missing the corresponding run-time lock assertion in its definition.

Per doc/developer-notes.md: "Combine annotations in function
declarations with run-time asserts in function definitions."

particl/particl-core,fujicoin/fujicoin,GroestlCoin/GroestlCoin,namecoin/namecoin-core,fujicoin/fujicoin,lateminer/bitcoin,Xekyo/bitcoin,domob1812/bitcoin,fanquake/bitcoin,jamesob/bitcoin,Xekyo/bitcoin,andreaskern/bitcoin,sstone/bitcoin,andreaskern/bitcoin,pataquets/namecoin-core,andreaskern/bitcoin,fanquake/bitcoin,fujicoin/fujicoin,fanquake/bitcoin,particl/particl-core,Xekyo/bitcoin,domob1812/namecore,anditto/bitcoin,namecoin/namecoin-core,jamesob/bitcoin,bitcoin/bitcoin,mruddy/bitcoin,fujicoin/fujicoin,lateminer/bitcoin,pataquets/namecoin-core,instagibbs/bitcoin,fujicoin/fujicoin,AkioNak/bitcoin,Xekyo/bitcoin,mruddy/bitcoin,jlopp/statoshi,jambolo/bitcoin,jambolo/bitcoin,kallewoof/bitcoin,bitcoinknots/bitcoin,domob1812/namecore,jambolo/bitcoin,achow101/bitcoin,sipsorcery/bitcoin,domob1812/bitcoin,instagibbs/bitcoin,AkioNak/bitcoin,domob1812/namecore,mruddy/bitcoin,bitcoinsSG/bitcoin,GroestlCoin/GroestlCoin,dscotese/bitcoin,fanquake/bitcoin,bitcoin/bitcoin,bitcoinsSG/bitcoin,achow101/bitcoin,jamesob/bitcoin,lateminer/bitcoin,namecoin/namecoin-core,sstone/bitcoin,bitcoinknots/bitcoin,jamesob/bitcoin,GroestlCoin/bitcoin,sstone/bitcoin,mruddy/bitcoin,bitcoin/bitcoin,jlopp/statoshi,GroestlCoin/bitcoin,pataquets/namecoin-core,andreaskern/bitcoin,namecoin/namecore,jambolo/bitcoin,tecnovert/particl-core,kallewoof/bitcoin,namecoin/namecore,sipsorcery/bitcoin,jamesob/bitcoin,pataquets/namecoin-core,sipsorcery/bitcoin,jlopp/statoshi,domob1812/bitcoin,sipsorcery/bitcoin,sipsorcery/bitcoin,achow101/bitcoin,domob1812/namecore,instagibbs/bitcoin,dscotese/bitcoin,GroestlCoin/GroestlCoin,anditto/bitcoin,GroestlCoin/bitcoin,pataquets/namecoin-core,bitcoin/bitcoin,domob1812/bitcoin,kallewoof/bitcoin,ajtowns/bitcoin,mruddy/bitcoin,jlopp/statoshi,tecnovert/particl-core,achow101/bitcoin,bitcoinknots/bitcoin,dscotese/bitcoin,anditto/bitcoin,kallewoof/bitcoin,jlopp/statoshi,namecoin/namecore,mruddy/bitcoin,particl/particl-core,pataquets/namecoin-core,kallewoof/bitcoin,sstone/bitcoin,domob1812/namecore,anditto/bitcoin,GroestlCoin/bitcoin,achow101/bitcoin,AkioNak/bitcoin,GroestlCoin/bitcoin,AkioNak/bitcoin,dscotese/bitcoin,particl/particl-core,sstone/bitcoin,domob1812/namecore,AkioNak/bitcoin,lateminer/bitcoin,ajtowns/bitcoin,anditto/bitcoin,fanquake/bitcoin,dscotese/bitcoin,lateminer/bitcoin,fanquake/bitcoin,tecnovert/particl-core,tecnovert/particl-core,namecoin/namecore,instagibbs/bitcoin,jambolo/bitcoin,instagibbs/bitcoin,tecnovert/particl-core,instagibbs/bitcoin,bitcoinsSG/bitcoin,GroestlCoin/GroestlCoin,sipsorcery/bitcoin,sstone/bitcoin,bitcoin/bitcoin,bitcoinsSG/bitcoin,namecoin/namecore,namecoin/namecoin-core,domob1812/bitcoin,ajtowns/bitcoin,particl/particl-core,domob1812/bitcoin,bitcoinsSG/bitcoin,ajtowns/bitcoin,lateminer/bitcoin,namecoin/namecoin-core,achow101/bitcoin,bitcoin/bitcoin,jambolo/bitcoin,Xekyo/bitcoin,dscotese/bitcoin,ajtowns/bitcoin,GroestlCoin/GroestlCoin,bitcoinsSG/bitcoin,bitcoinknots/bitcoin,ajtowns/bitcoin,andreaskern/bitcoin,bitcoinknots/bitcoin,GroestlCoin/GroestlCoin,AkioNak/bitcoin,andreaskern/bitcoin,particl/particl-core,Xekyo/bitcoin,jlopp/statoshi,GroestlCoin/bitcoin,kallewoof/bitcoin,fujicoin/fujicoin,tecnovert/particl-core,jamesob/bitcoin,namecoin/namecore,namecoin/namecoin-core,anditto/bitcoin