Photonic-Crystal Scintillators: Molding the Flow of Light to Enhance X-Ray and $\gamma$-Ray Detection