Biden and McCarthy agree on terms to raise borrowing limit but must convince sceptical members of their parties