[MRG] ENH: Return distances option for linkage_trees

On the lines of https://github.com/scikit-learn/scikit-learn/pull/3158 . Also a micro optimization for the `ward_tree` option, by preallocating the distance array.
swap if statement to have positive case?

``` python
if return_distance:
    return children, n_components, n_leaves, parent, dist
return children, n_components, n_leaves, parent