SPARK-2149. Univariate kernel density estimation

Yeah it's doing this part in log space, but I don't see why these values are expected to be exceptionally large or small. It looks like the original code exposes a density and logDensity method, so one's written in terms of the other to avoid duplication -- not sure it is necessarily because it's better in that form. Anyone else have ideas?