How photonic crystals can improve the timing resolution of scintillators