mutex debugging routines: LocksHeld() and AssertLockHeld()
Merge pull request #3329 from gavinandresen/syncdebug

mutex debugging routines: LocksHeld() and AssertLockHeld()