Several challengers are outraising incumbents in intraparty battles that are exposing ideological divides within both parties.