em-http-request.rb: favor regular headers
change payload to be class based, and avoid creating empty file for em
fix a bug where we cannot close the client in callback