At least 21 people have been killed after Mozambique's highest court confirmed the ruling party's Daniel Chapo as the winner of a disputed election.