Brooklyn appeals court limits liability of school in student’s death