Theoretical model of the plasma edge. I: Linear and quasi-linear theories of the ionization drift instability in a strongly inhomogeneous medium