California gunman dies after killing two police detectives