Thinking Fast and Slow in AI: the Role of Metacognition