refactor sftp subsystem request handling
refactor sftp subsystem request handling

Refactor the sftp subsystem request handling to make it more similar to
an exec request. This simplifies and improves the readability of the
code.

markpeek/packer,pecigonzalo/packer,pvanbuijtene/packer,KohlsTechnology/packer,pieter-lazzaro/packer,markpeek/packer,pieter-lazzaro/packer,sneal/packer,rnaveiras/packer,KohlsTechnology/packer,zhuzhih2017/packer,pvanbuijtene/packer,legal90/packer,markpeek/packer,mkuzmin/packer,KohlsTechnology/packer,tb3088/packer,bryson/packer,ricardclau/packer,pvandervelde/packer,grubernaut/packer,jimmythedog/packer,c22/packer,KohlsTechnology/packer,tb3088/packer,timsutton/packer,dave2/packer,pecigonzalo/packer,threatstream/packer,mkuzmin/packer,grubernaut/packer,youhong316/packer,atlassian/packer,mwhooker/packer,monkeylittleinc/packer,jimmythedog/packer,markpeek/packer,p1-nico/packer,dayglojesus/packer,samdunne/packer,threatstream/packer,paulmey/packer,sean-/packer,pvandervelde/packer,sean-/packer,tas50/packer,pvanbuijtene/packer,ChrisLundquist/packer,pvandervelde/packer,tas50/packer,boumenot/packer,p1-nico/packer,grubernaut/packer,monkeylittleinc/packer,pvandervelde/packer,c22/packer,mwhooker/packer,dayglojesus/packer,dayglojesus/packer,mitchellh/packer,rickard-von-essen/packer,threatstream/packer,paulmey/packer,samdunne/packer,samdunne/packer,bryson/packer,arizvisa/packer,sneal/packer,sneal/packer,youhong316/packer,pvanbuijtene/packer,jimmythedog/packer,hashicorp/packer,mwhooker/packer,jimmythedog/packer,legal90/packer,tsmolka/packer,ricardclau/packer,c22/packer,legal90/packer,ricardclau/packer,tsmolka/packer,tb3088/packer,tb3088/packer,atlassian/packer,zhuzhih2017/packer,jen20/packer,atlassian/packer,paulmey/packer,rnaveiras/packer,mwhooker/packer,mitchellh/packer,taliesins/packer,routelastresort/packer,youhong316/packer,sean-/packer,atlassian/packer,sean-/packer,smaato/packer,ricardclau/packer,tb3088/packer,ricardclau/packer,routelastresort/packer,pvandervelde/packer,mitchellh/packer,tb3088/packer,mitchellh/packer,p1-nico/packer,routelastresort/packer,grubernaut/packer,taliesins/packer,p1-nico/packer,life360/packer,rnaveiras/packer,paulmey/packer,paulmey/packer,youhong316/packer,routelastresort/packer,rickard-von-essen/packer,mafrosis/packer,boumenot/packer,mitchellh/packer,atlassian/packer,rickard-von-essen/packer,mkuzmin/packer,ChrisLundquist/packer,dave2/packer,rickard-von-essen/packer,ChrisLundquist/packer,mkuzmin/packer,mafrosis/packer,mwhooker/packer,mkuzmin/packer,KohlsTechnology/packer,youhong316/packer,bryson/packer,c22/packer,life360/packer,life360/packer,legal90/packer,markpeek/packer,life360/packer,pieter-lazzaro/packer,dayglojesus/packer,tas50/packer,quantang/packer,routelastresort/packer,dave2/packer,jen20/packer,rnaveiras/packer,tsmolka/packer,taliesins/packer,zhuzhih2017/packer,bryson/packer,smaato/packer,smaato/packer,tsmolka/packer,grubernaut/packer,sneal/packer,taliesins/packer,pieter-lazzaro/packer,jen20/packer,jen20/packer,mafrosis/packer,samdunne/packer,dave2/packer,quantang/packer,timsutton/packer,tas50/packer,ChrisLundquist/packer,c22/packer,youhong316/packer,mkuzmin/packer,quantang/packer,threatstream/packer,pieter-lazzaro/packer,dayglojesus/packer,taliesins/packer,grubernaut/packer,quantang/packer,pecigonzalo/packer,ChrisLundquist/packer,smaato/packer,timsutton/packer,pieter-lazzaro/packer,hashicorp/packer,taliesins/packer,dave2/packer,c22/packer,sean-/packer,pecigonzalo/packer,sneal/packer,jen20/packer,tas50/packer,KohlsTechnology/packer,p1-nico/packer,pvandervelde/packer,dave2/packer,timsutton/packer,hashicorp/packer,timsutton/packer,threatstream/packer,boumenot/packer,bryson/packer,zhuzhih2017/packer,samdunne/packer,hashicorp/packer,monkeylittleinc/packer,tsmolka/packer,timsutton/packer,rnaveiras/packer,p1-nico/packer,monkeylittleinc/packer,rickard-von-essen/packer,mafrosis/packer,atlassian/packer,jen20/packer,legal90/packer,tsmolka/packer,boumenot/packer,life360/packer,quantang/packer,monkeylittleinc/packer,zhuzhih2017/packer,smaato/packer,paulmey/packer,arizvisa/packer,mafrosis/packer,ChrisLundquist/packer,arizvisa/packer,ricardclau/packer,sean-/packer,boumenot/packer,smaato/packer,pvanbuijtene/packer,zhuzhih2017/packer,rnaveiras/packer,arizvisa/packer,jimmythedog/packer,markpeek/packer,arizvisa/packer,arizvisa/packer,tas50/packer,bryson/packer