Two-level system immersed in a photonic band-gap material: A non-Markovian stochastic Schrödinger-equation approach