Functional polyesters for drug delivery and 3D printing