Tonga secured their first victory of the Rugby World Cup and their highest points tally to date as they ran in five tries against Namibia.