Quantization of Maxwell's equations on curved backgrounds and general local covariance