The theory that a goldfish's memory only lasts for a matter of seconds has been debunked by a leading ecologist.