Kinetic theory of thermal transpiration and mechanocaloric effect. V. Flow of polyatomic gases in a cylindrical tube with arbitrary accommodation at the surface