Strain-tuning of periodic optical devices: tunable gratings and photonic crystals