The European Union took a major step Wednesday toward setting rules — the first in the world — on how companies can use artificial intelligence.