How your Brain Ignores Distractions through Optimal Inattention