Refactor: moved flatten function to utils

Previously, the keystone.common.authorization module contained the function
"flatten", which would transform a dictionary (possibly nested) into a
single level dictionary. Given that the "flattening" of a dictionary is
a more general concept, not related to authorization, I thought it would
be more intuitive to have it in the keystone.common.utils module.

Change-Id: Ic1f6fa70634ade41e392ee7c5cd8adac913fd0b8