California churchgoers detained gunman in deadly attack