The Tensor Brain: A Unified Theory of Perception, Memory and Semantic Decoding