Electrosynthesis of carboxylic acids from organic halides and carbon dioxide