Nonadiabatic switching of a photonic band structure: Ultrastrong light-matter coupling and slow-down of light