MEMO: A Deep Network for Flexible Combination of Episodic Memories