#1902 implemented unit tests for mean and covariance functions. implemented sum and product mean function. fixed incorrect gradient calculation in covprod