Measurement of the Y(1S), Y(2S), and Y(3S) polarizations in pp collisions at sqrt(s) = 7 TeV