A Welsh teenager killed himself after being blackmailed for money by a sextortion gang in West Africa, an inquest has heard.