Dodgers rally in 9th to beat Diamondbacks 8-7