AI is now coding apps, drafting contracts and organizing marketing campaigns. Yet the money being spent on the technology has ballooned into a vast liability hanging over financial markets, and it's still not clear how it will all pay off