Lesotho’s Prime Minister Thomas Thabane has resigned after months of pressure over his alleged involvement in the murder of his estranged wife in 2017.