ENH: spatial: reimplement cdist_cosine using np.dot