Regioselective synthesis of ω-bromo-3-ketosulfones, ω-bromo-3-ketonitriles and 2-(ω-bromoalkyl)benzofurans based on a ‘ring-closing/ring-opening’ strategy