s3manager: Fix memory leak
s3manager: Fix memory leak

Before this fix, s3manager was holding onto the entire contents of the
io.Reader that it's uploading.

Each work chunk is

  type chunk struct {
    buf []byte
    num int64
  }

and the list of completed parts is []*s3.CompletedPart which include

  PartNumber *int64

When the new completed part is created using &c.num for the PartNumber,
the pointer means that the whole surrounding chunk, including the
buffer, is still live as far as the collector is concerned.

The fix is simple: copy num.

matematik7/aws-sdk-go,marcosnils/aws-sdk-go,dragonfax/aws-sdk-go,wolfspyre/aws-sdk-go,rail/aws-sdk-go,Onefootball/aws-sdk-go,fwiesel/aws-sdk-go,calgaryscientific/aws-sdk-go,jjeffery/aws-sdk-go,jacobxk/aws-sdk-go,jacobxk/aws-sdk-go,myshen/aws-sdk-go,calgaryscientific/aws-sdk-go,rosenhouse/aws-sdk-go,ebartels/aws-sdk-go,jjeffery/aws-sdk-go,zmarois/aws-sdk-go,xibz/aws-sdk-go,keithpitt/aws-sdk-go,marcosnils/aws-sdk-go,rikuayanokozy/aws-sdk-go,euank/aws-sdk-go,ebartels/aws-sdk-go,ebartels/aws-sdk-go,myshen/aws-sdk-go,dragonfax/aws-sdk-go,zmarois/aws-sdk-go,zmarois/aws-sdk-go,xibz/aws-sdk-go,jkakar/aws-sdk-go,yxd-hde/aws-sdk-go,skyportsystems/aws-sdk-go,digantsh/aws-sdk-go,radeksimko/aws-sdk-go,rikuayanokozy/aws-sdk-go,jjeffery/aws-sdk-go,fwiesel/aws-sdk-go,agworld/aws-sdk-go,myshen/aws-sdk-go,yxd-hde/aws-sdk-go,aws/aws-sdk-go,skyportsystems/aws-sdk-go,dafyddcrosby/aws-sdk-go,bpot/aws-sdk-go,matematik7/aws-sdk-go,vito/aws-sdk-go,digantsh/aws-sdk-go,agworld/aws-sdk-go,wolfspyre/aws-sdk-go,Onefootball/aws-sdk-go,dragonfax/aws-sdk-go,luzh0422/aws-sdk-go,ahamilton55/aws-sdk-go,xibz/aws-sdk-go,ahamilton55/aws-sdk-go,euank/aws-sdk-go,devx/aws-sdk-go,devx/aws-sdk-go,yxd-hde/aws-sdk-go,rosenhouse/aws-sdk-go,luzh0422/aws-sdk-go,ahamilton55/aws-sdk-go,digantsh/aws-sdk-go,rail/aws-sdk-go,matematik7/aws-sdk-go,radeksimko/aws-sdk-go,tml/aws-sdk-go,ruseinov/aws-sdk-go,jkakar/aws-sdk-go,rikuayanokozy/aws-sdk-go,agworld/aws-sdk-go,ruseinov/aws-sdk-go,rail/aws-sdk-go,rosenhouse/aws-sdk-go,skyportsystems/aws-sdk-go,yxd-hde/aws-sdk-go,gunosy/aws-sdk-go,jkakar/aws-sdk-go,ruseinov/aws-sdk-go,jacobxk/aws-sdk-go,xibz/aws-sdk-go,dafyddcrosby/aws-sdk-go,jasdel/aws-sdk-go,bpot/aws-sdk-go,calgaryscientific/aws-sdk-go,zmarois/aws-sdk-go,keithpitt/aws-sdk-go,radeksimko/aws-sdk-go,gunosy/aws-sdk-go,dafyddcrosby/aws-sdk-go,vito/aws-sdk-go,radeksimko/aws-sdk-go,Onefootball/aws-sdk-go,vito/aws-sdk-go,myshen/aws-sdk-go,calgaryscientific/aws-sdk-go,tml/aws-sdk-go,wolfspyre/aws-sdk-go,luzh0422/aws-sdk-go,keithpitt/aws-sdk-go,marcosnils/aws-sdk-go,fwiesel/aws-sdk-go,bpot/aws-sdk-go,gunosy/aws-sdk-go,tml/aws-sdk-go,devx/aws-sdk-go,agworld/aws-sdk-go,euank/aws-sdk-go