The president has been hearing blunt news from advisers about the GOP’s chances in the midterm elections and has signaled he understands that he has contributed to the poor political environment.