ENH: spatial: reimplement cdist_cosine using np.dot
ENH: spatial: use arrays' dotfunc in pdist(metric='cosine')

Suggested by @jaimefrio.