Nine people were killed when gunmen opened fire at a South African pub, the country’s second mass shooting in three weeks.