Structure and stability of closo-hexaboranes and their heteroanalogs