Fix infinite loop with LogPrint on Windows

Running -printtodebugger -debug (or -debug=lock),
compiled with -DDEBUG_LOCKORDER would infinite loop
on Windows because every critical section lock/unlock
triggers a LogPrint.

Solution is to use the raw boost mutex instead of a CCriticalSection.
Use thread-local storage for LogPrint(category...)

This prevents crashes at shutdown where a global destructor
calls LogPrint(category...) after mapMultiArgs has been
deleted.
fixed documetation on hardening flags
Merge pull request #3411

08b93f9 fixed documetation on hardening flags (HaltingState)
Merge pull request #3377

0b238b2 Use thread-local storage for LogPrint(category...) (Gavin Andresen)
962b1cf Fix infinite loop with LogPrint on Windows (Gavin Andresen)