Microsoft will invest $1.5 billion into G42, an artificial intelligence firm based in the United Arab Emirates.