Triangle Singularities In The Production Of The X(3872) Resonance