gi: add GVL unlock detect API to loader