Manny Machado reaches deal to join San Diego Padres