Non-Markovian Quantum Thermometry