Democratic-aligned groups and candidates have spent tens of millions of dollars to influence GOP primaries across the country this year, hoping that their efforts will yield less-electable, more-controversial Republican nominees in the general elections.