A gradient flow approach to quantization of measures