Former Philippines President Rodrigo Duterte is on a plane to The Hague, the country's leader has said, after being arrested over a "war on drugs" that killed thousands.