Non-Markovian stochastic Schrödinger equation