[flare] Close the tar file cleanly once upload is done
[flare] Close the tar file cleanly once upload is done

Otherwise the file is closed only when the file object is garbage-
collected.

Fixes flare tests errors on Windows.

indeedops/dd-agent,jyogi/purvar-agent,cberry777/dd-agent,cberry777/dd-agent,manolama/dd-agent,Wattpad/dd-agent,jyogi/purvar-agent,cberry777/dd-agent,Wattpad/dd-agent,indeedops/dd-agent,cberry777/dd-agent,cberry777/dd-agent,manolama/dd-agent,Wattpad/dd-agent,indeedops/dd-agent,Wattpad/dd-agent,jyogi/purvar-agent,manolama/dd-agent,takus/dd-agent,takus/dd-agent,takus/dd-agent,indeedops/dd-agent,jyogi/purvar-agent,manolama/dd-agent,manolama/dd-agent,takus/dd-agent,takus/dd-agent,jyogi/purvar-agent,indeedops/dd-agent,Wattpad/dd-agent