The mechanics of pipeline reeling