House Speaker Paul D. Ryan said Thursday that Medicare has “serious problems” that would need to be addressed when Congress moves to repeal and replace President Obama’s health-care reform law — a signal that he is willing to immediately enter the treacherous politics of entitlement reform and perhaps break with President-elect Donald Trump.