Reaction of dicarbonates with carboxylic acids catalyzed by weak Lewis acids: General method for the synthesis of anhydrides and esters