1-acyl-2-cyclopentenes and 5-acylbicyclo[2.1.0]pentanes: photochemical and thermal isomerizations