Self-ordering of random intercalates in thin films of cuprate superconductors : Growth model and x-ray diffraction diagnosis