Elon Musk’s X has said it will stop its AI chatbot Grok from undressing images of real people following a global backlash.