[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.
> I think the scipy version can safely assumed to be right

well, yes, but we don't know what will happen in future versions of scipy, even if it's unlikely that something will break. a couple of lines of code will make this code independent of scipy, which I think it's good.