Simple and selective one-pot replacement of the N-methyl group of tertiary amines by quaternization and demethylation with sodium sulfide or potassium thioacetate: an application to the synthesis of pergolide