Properly invalidate cache for get_*_by_name methods

Use the original name for invalidating the cache on the
get_project_by_name and get_domain_by_name when performing update
operations on the name attributes.

Change-Id: If58a3b0a47501096f9fa9eb9cd7a6057f7b29298
Closes-Bug: #1311142
Fix 500 error if request body is not JSON object

In `JsonBodyMiddleware` we expect POST body to be a JSON dictionary,
and failed with 500 error if body was a valid JSON, but not a
dictionary.  Additional check was added along with a test for described
case.

Change-Id: I08ae3c8fa4eb53b67604d8b8791ca19d9c1682e6
Closes-Bug: #1316657
Update sample keystone.conf file

The sample file I generate seems to be different from the one
in the master branch.

Change-Id: I6ecfb41474798e9e980f05c2f7b09299c4758789
fix flake8 issues

Fixes the following flake8 issues:

- import shadowed by loop variable (flake8 F402)
- list comprehension redefines 'role_ref' (flake8 F812)

Change-Id: Ida64ccc9d7ee8b2ecd110a908615d3a94e93785c
Updated from global requirements

Change-Id: I1628854fac8bf66f8bc28648d28fba253d9c04af
Merge "Update sample keystone.conf file"
Merge "fix flake8 issues"
Merge "Updated from global requirements"
Merge "Properly invalidate cache for get_*_by_name methods"
Fix the typo and reformat the comments for the added option

Change-Id: I01c471976f2c6d80bfe629b61ab75b81d6cabb1a
Related-Bug: #1175904
Merge "Fix the typo and reformat the comments for the added option"
Merge "Fix 500 error if request body is not JSON object"