Pass bytes to NamedTemporaryFile.write()

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

Change-Id: I45faa50c4796605885489c9003a1b23b0f0b3080
Modify stack ID lookup to only use stacks:lookup

Currently when we lookup a stack ID (fully qualified name/id) via
stacks:lookup, we also follow the redirect to stacks:show, which
is not allowed for stack users.  We don't actually need to follow
the redirect, as we already have the required ID, so instead we
return the redirect response, so we can just allow all users to
do stacks:lookup in the policy.

This is useful for clients who want to call API actions which are
allowed for stack users, e.g resource:signal without having to know
both the name and ID of the stack.

Change-Id: I6f079cbc7ac3c680f15941668b4efbe4c3c5d60d
Partial-Bug: #1291097
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
Oslo: sync strutils

The strutils module has been improved with regards to Python 3
compatibility.  For instance, safe_{encode,decode} may now take bytes
as input, which is needed to completely port heatclient to Python 3.

This module is now in sync with commit
c1f1a6d87d3f8a5420f5e749ae5ed85e15ff5fe4.

Change-Id: I658467dc85038da029e0ae8b40fc027cdc4d5eaf
Remove dependent module py3kcompat

Module py3kcompat was removed from oslo-incubator, we can use
six directly.

* Sync commit of removing py3kcompat from oslo
* use six replace usage of py3kcompat

Change-Id: If0f9397588b2180fe198e804cbbb5b5c8420fe76
Closes-Bug: #1280033
Add stack-preview support

Co-Authored-By: Richard Lee <rblee88@gmail.com>
Change-Id: I4d7b12f6da09411d45dd6022dc11b8ece76b4932
Implements: blueprint preview-stack
Merge "Oslo: sync strutils"
Merge "Add stack-preview support"
Merge "Modify stack ID lookup to only use stacks:lookup"
Merge "Remove dependent module py3kcompat"
Merge "Add new tests to cover most of the requests port"
Merge "Pass bytes to NamedTemporaryFile.write()"