[ENH] 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.
Could you please check that this render right in the html docs. There have been problems with sphinx, math, and docstrings.