Switching the reaction pathways of electrochemically generated β-haloalkoxysulfonium ions – synthesis of halohydrins and epoxides