On the history, however, Yglesias says:
No incumbent president has ever been defeated in a primary. And the only “close calls” came in a tightly bunched historical period (1968, 1976, 1980) characterized by substantial transformation of the regional bases of the major political parties.I'm not sure what he means by "in a primary." If he means "denied renomination by his party when he wanted the nomination," then it's not true. Johnson in 1968 is a hard case -- he dropped out before it could be tested, but it's fairly likely he would have been renominated. But it's typical of the pre-1972 situation, when it was difficult to tell who the "real" candidates might be. Truman in 1952 and Wilson in 1920 probably wanted renomination, but weren't going to get it. I'm not much of an expert on the 19th century process, but there are several such cases back then.
Of course, that was before primary elections, and the Truman, Wilson, and Johnson cases were before the current process was implemented in 1972. After that, it is true that no incumbent has been defeated: Nixon, Ford, Carter, Reagan, Bush, Clinton, and Bush were all renominated, with only two as close cases. But Nixon, Reagan, and Clinton all won landslides; of course they were renominated! The question is what would happen should Obama look like a loser in November. I'd say that George W. Bush is also not relevant here; even though he wound up winning a close race, he was pretty popular a year before the election, when choices would have to be made.
That leaves the three presidents since the modern nomination began who were renominated and then defeated: Ford, Carter and George H.W. Bush. Ford and Carter were seriously challenged, but Bush was not (although fringe candidate Pat Buchanan did run a real campaign, albeit without ever threatening Bush's renomination). That history would suggest that an unpopular president stands a significant risk of a serious challenge.
On the other hand...the two serious challenges took place early in the reformed process, before party elites had fully figured out how to control the system. Moreover, in both cases the challenge came from a long-acknowledged leader of the party; the only comparable figure in the Democratic Party today is the Secretary of State in Obama's own administration. Both of those challenges also came from the ideological extreme (which is apt to feel betrayed by any president because the nomination process pushes candidates to the extremes while the general election and governing pushes them to the center).
So as I said at the top, anyone who thinks Evan Bayh is a nomination threat to Obama is nuts. But denying a sitting president renomination isn't quite as historically far-fetched as Yglesias believes. If a double-dip recession brings unemployment to over 12%, I wouldn't be certain that Obama will be the Democratic candidate in 2012 (I think he would be, but I wouldn't be certain). But it ain't gonna be Evan Bayh.