Event-by-event fluctuations of the mean transverse momentum in 40, 80, and 158 A GeV/c Pb-Au collisions