Keeping track of reality: embedding visual memory in natural behaviour