European companies badly trail their American and Chinese rivals on A.I. and digitalization. To catch up, they’ll need to collaborate with governments and each other.