Ultrafast All-optical Switching and Laser Action in Rotaxane