Thermal and chemical intramolecular N → N acyl-migration in 8-acyl-3, 8-diazabicyclo[3.2.1]octanes