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

Suggested by @jaimefrio.