Small‐angle X‐ray data processing for planar multilayered structures. I. Theory