HttpUtils: fixes for powershell transport
HttpUtils: fixes for powershell transport

This commit refactors the powershell transport to avoid duplication and
also fixes a few problems with it:

* We now run powershell with the ExecutionPolicy bypass, is required when
  the default security policy disallows executing unsigned scripts
  (like our script)
* The powershell script itself has been refactored to behave more like
  curl. In particular, it now prints HTTP status code errors in a nicer
  way instead of failing with a PowerShell Exception + backtrack. We also
  now only print the exception message when we get any other exception,
  since the user is likely not familar with the powershell script at all
  and the other information is thus only confusing and not helpful at all.
* We now handle the case where the server returns some message after a
  POST or a PUT correctly. Previously, that resulted in the raw bytes
  being written to stdout before the HTTP status code, which confused the
  simplistic parser. We now always write the HTTP status code first and
  decode the bytes as UTF8 before sending them to stdout as well.

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