The comedian Stephen Colbert appeared in character before Congress on Friday to testify about an immigration bill.