WASHINGTON—At the dusk of both of their political careers, surrounded by teary friends and family, President Barack Obama on Thursday …