Padres rally past Giants 8-7