ward_tree: return distances

Modified `ward_tree` to return distances for both the structured and unstructured versions,
useful to have when plotting the dendrogram with scipy.
OK. I created another pull request for bug fix. See here

https://github.com/scikit-learn/scikit-learn/pull/3966