Azimuthal anisotropy of D-meson production in Pb-Pb collisions at sqrt(s_NN) = 2.76 TeV