The world is racing to expand its semiconductor factories. So shares of the firms that supply chip-making gear have outperformed the S&P 500 by nearly 25% this year.