Spin-orbit density functional and ab initio study of HgX(n) (X=F, Cl, Br, and I; n=1, 2, and 4).