Gunmen kill Egyptian general, ousted president defiant at trial