A gunman opened fire in a gay nightclub in Colorado, killing five and injuring 18 before a 22-year-old suspect was subdued by “heroic” patrons and arrested by police.