Move implementations of cdf and quantile to AbstractTDigest.

ArrayDigest and TreeDigest have almost the same implementation of cdf and
quantile. I think it would be nice to have it implemented in
AbstractTDigest for better code reuse.