Electronic structure, spectra, and properties of 4:2-coordinated materials. I. Crystalline and amorphousSiO2andGeO2