Measurement of the W-boson mass in pp collisions at sqrt(s) = 7 TeV with the ATLAS detector