A police officer, a civilian and the suspected gunman were killed after a shooting in Montreal.