Lowry scores 24 points, Raptors beat Cavaliers 117-97