The theory of structurally incommensurate systems. I. Disordered-incommensurate phase transitions