Surging AI investment is pushing up the cost of smartphones and other gadgets, according to analysts. Here's why.