Emergence of a proton exchange-based isomerization and lactonization mechanism in the plant coumarin synthase COSY