Structure and electronic properties of oxyanionic crystal surfaces