Stop ProcessLoop upon deallocation
Refactor mutex usage into B_MUTEX_ macro family

Initialization is still platform-dependant.
Provide C signatures for b_log_lock and b_log_unlock

void is needed in C (but not C++) for empty parameter lists.