Measurement of underlying event characteristics using charged particles in pp collisions at sqrt(s) = 900 GeV and 7 TeV with the ATLAS detector