Elon Musk's social media company X says it will block its AI chatbot Grok from creating explicit images of real people after governments around the world launched investigations into the feature.