A California appeals court has thrown out a suit against a school district and two school officials alleging their failure to address bullying led to a teenager's death by suicide, saying state law makes them immune to liability for harm to students that occurs off campus and outside of school hours.