First-principles study of the electronic structure of PbF2 in the cubic, orthorhombic, and hexagonal phases