Dynamics of attentional allocation to targets and distractors during visual search