The deaths this year of Mr. Bush and Senator John McCain have been described as the passing of an era, the demise of pragmatic Republicanism. But neither of the two onetime naval aviators was anchored in ideology, veering between moderation and conservatism depending on the political needs of the moment.