portdbapi: use global_event_loop when safe
Add portage._internal_caller var, and use it.