Sub-quadratic Algorithms for Kernel Matrices via Kernel Density Estimation