Remove use of py3kcompat

Replace usage of py3kcompat.urlutils by six imports. py3kcompat has been
removed from oslo incubator so we should try to sync.

Change-Id: I252ff2b3a5284cee6e09e70a79b7dad550335f41
Allow for stack users in _authorize_stack_user

This change allows stack user credentials to be used to call
describe_stack_resource (heat resource-metadata)

It makes the following changes:
* _authorize_stack_user first attempts authorize with
  stack.access_allowed using the context user_id before falling back
  to looking for ec2 credentials
* context middleware sets the user_id on the context even when the
  username is not specified

This change also adds missing test coverage to ContextMiddleware

Change-Id: Idb655e403ba11a3144dacf34eba0feb59ab8d911
Closes-Bug: #1299982
Merge "Allow for stack users in _authorize_stack_user"
Merge "Remove use of py3kcompat"