In a heartfelt Instagram post, James Corden said it had been "the greatest privilege" to make the show