Working-class and non-white voters, once steadfast Democratic supporters, are shifting to the Republican Party in droves.