Quantum thermometry by single-qubit dephasing