Add debug logging infrastructure (cgo_callback_sync_set_log_callback API function)
Fix consumer_in_use initialization