Global dynamics of selective attention and its lapses in primary auditory cortex