Molecular conformations and rotation barriers of 2-halogenoethanethiols and 2-halogenoethanols: an ab initio study