At least 27 people have been killed in two separate mass shootings in South Africa near Johannesburg and Cape Town as police launch investigations and manhunts for the suspects.