A US jury has found Hadi Matar guilty of attempting to murder the novelist Salman Rushdie.