Algerian boxer Imane Khelif has won gold in the women's 66 kilogram category at the Paris Olympics, despite controversy over her gender eligibility.