Acid-catalyzed isomerization of 1-acyl- and 1-thioacylaziridines. I. Mechanism of nucleophilic substitution