Перенос некоторых комиков из ветки Bitcoin

1)Remove redundant .c_str()s
After the tinyformat switch sprintf() family functions support passing
actual std::string objects.

2)mutex debugging routines: LocksHeld() and AssertLockHeld()