Polyesters containing both carboxylic ester groups and carbonate groups