A Spiking Neural Model of Episodic Memory Encoding and Replay in Hippocampus