#61: added distance parameter to kmeans which defaults to Euclidean.  Added cosine_similarity to interactive API.