The Brain Functions That Underlie Visual Metacognition