Stereoselective halogenations of alkenes and alkynes in ionic liquids