Kernel methods for estimating covariance functions from curves