cliutils restore python3 string decode

Since the the safe_encode function moved from incubator strutils
to oslo.utils the print_list and print_dict functions don't work
as expected on python3, because the safe_encode in encodeutils
lacks the logic to decode on python3 like existed in strutils.

So, reinstate that logic within the print_list and print_dict
functions, and add a couple of simple tests to ensure we keep
them working (no other tests check the string output from the
prints AFAICS).

Change-Id: I42f6aa802c1f94fcbf0e9170024cf37089f92782
Closes-Bug: #1390505
Simplify is_user_context method

Remove unnecessary if/else clauses and keep the code simpler.

Change-Id: I31ed8826f7d05ec6efe93486e0f7f6a7bb05b8f1
Fixes nits in module policy

These nits were reported while syncing oslo-incubator code.
https://review.openstack.org/#/c/133492/2/heat/openstack/common/policy.py

Change-Id: I534763383eb2199c9223223d4c2fbd6dd25272ed
Merge "Simplify is_user_context method"
Merge "Fixes nits in module policy"
Merge "cliutils restore python3 string decode"