Pass bytes to NamedTemporaryFile.write()

In Python 3, this function takes bytes as an input.

Change-Id: I45faa50c4796605885489c9003a1b23b0f0b3080
Add new tests to cover most of the requests port

After the merge to requests there was a few tests to be added to
properly cover the port and now reach 97% for coverage of
heatclient/common/http.

Change-Id: I8282459718968337f1bcd650d540509c418020c5
Merge "Add new tests to cover most of the requests port"
Merge "Pass bytes to NamedTemporaryFile.write()"