Homeomorphic Alignment of Weighted Trees