At least 360 captives kidnapped by Boko Haram in March have been freed from a remote mountain hideout in Nigeria's Borno state.