Efficient Coding, Prediction and Mental Imagery for Intelligent, Cognitive Behavior in Robots