HTTPUtils: curl: correct handling of text response
HTTPUtils: curl: correct handling of text response

This fixes an issue in the curl transport when a text response is returned
that doesn't end with a newline from a POST or PUT request. The code expects
the HTTP status code to be on a new line, but that is not the case if the response
doesn't have a trailing new line. We fix this by always printing a new line before
printing the status code. To avoid duplicate new lines, we now strip trailing empty
lines at the end of the response.

garetxe/cabal,kolmodin/cabal,thomie/cabal,edsko/cabal,Heather/cabal,gbaz/cabal,themoritz/cabal,themoritz/cabal,sopvop/cabal,martinvlk/cabal,martinvlk/cabal,Heather/cabal,bennofs/cabal,bennofs/cabal,garetxe/cabal,trskop/cabal,headprogrammingczar/cabal,themoritz/cabal,kolmodin/cabal,mydaum/cabal,edsko/cabal,lukexi/cabal,gbaz/cabal,sopvop/cabal,sopvop/cabal,headprogrammingczar/cabal,mydaum/cabal,lukexi/cabal,randen/cabal,thomie/cabal,trskop/cabal,randen/cabal