Toward a NNLO calculation of the anti-B ---> X(s) gamma decay rate with a cut on photon energy: I. Two-loop result for the soft function