Speaker Paul D. Ryan took the helm to heal a fractured Republican Party. He will leave in January with fault lines still visible, this time drawn by President Trump.