A settlement links monetary penalties with stricter oversight as Valero moves toward idling refinery operations.