Covariance operators, Green functions, and canonical stochastic electromagnetic fields