ENH optimize KMeans for sparse inputs

In the document clustering example, the speedup is typically between
15× and 150×.