Deformation spaces of trees