X, formerly Twitter, is being investigated by the EU over the possible spread of terrorist and violent content.