3M Co.'s longtime legal chief is preparing to part ways with the global conglomerate to take over as the general counsel at Medtronic.