Disorder‐induced piezoelectric and piezo‐optic effects. I. The theory of the piezoelectric properties and its application to ice