In what two situations can the government declare a state of emergency in South Africa?