Guatemala's schools have been cancelled and residents advised to stay indoors after gang violence erupted and police officers were killed in prison riots.