Add a policy layer for membership APIs

Added a policy layer for the membership APIs of the domain
model.

Added following policies for membership APIs:

v1: 'get_members', 'delete_member' and 'modify_member'.

v2: 'add_member', 'get_member', 'modify_member',
'get_members' and 'delete_member'.

Implements blueprint membership-policy

Change-Id: I0d5782d1d9b7b8a563a689fcb192958ab3fea0f4
Remove routes collection mappings

When using the routes mapper's collection to map from URLs to
python functions several additional URIs are created by
default: 'new', 'format' and 'edit', eg this URI

/v1/images/new

was accessible and would return a '500'.

/v1/images/detail.xxx

was accessible and a 'GET' to it would create a file called 'detail.xxx'
in the image cache directory (where 'xxx' is an arbitrary string).

Similar resources for image memberships existed.

Other collection URIs (for both the API and Registry) would return
unexpected behaviour.

Use explicit mappings rather than a 'collection' to remove
the superfluous resources.

Fixes bug 1185828.

Change-Id: I2f451f0208d43cdc83dcf58a41ea31359b18fcf2
Replace openstack-common with oslo in HACKING.rst

Change-Id: I211d128dce385a173cac5fec9df413b813bc4626
Prevent '500' error when admin uses private marker

A 500 error was being raised when an admin tried to use the
id of a private image owned by another user as a marker.

Do not return 500 in these cases.

Also added appropriate test coverage.

Fixes bug 1172719.

Change-Id: If77d45c684dd7d4dda9eefd519fc3d36fc57e07a
Sql query optimization for image detail

Current the image detail call uses left outer joins
for its queries, which makes it neglect the index on the
images table. The approach used in this patch, splits up
the querying into two parts and then does the join,
so that we can make use of the index

Change-Id: I65df0be5f156959c1e70ad9cb1a8b7eceebb4d8a
Add missing Keystone settings to scrubber conf

The provided conf file for glance-scrubber was missing the auth settings
stanza required to make it work 'out of the box' in a Keystone environment
such as Devstack.

Also add the "Security Options" line just below for consistency with the
other configs.

Change-Id: I1182fd3a7a79c0f6aeb601d65c31e462fb3610bb
Merge "Sql query optimization for image detail"
Remove explicit distribute depend.

Causes issues with the recent re-merge with setuptools. Advice from
upstream is to stop doing explicit depends.

Change-Id: Ie875bbaae191cd0719db76cc375cd97d5bf90de7
Merge "Add missing Keystone settings to scrubber conf"
Merge "Prevent '500' error when admin uses private marker"
Merge "Remove routes collection mappings"
Use Python 3.x compatible octal literals

Python 3.x deprecated octal literals in the form
0755. Use 0o755  instead which works at least
with Python 2.6 and newer.

Change-Id: I3474f601dab0e2e1fbed8ef6f7472e3e453b94fb
Merge "Remove explicit distribute depend."
Merge "Add a policy layer for membership APIs"
Merge "Use Python 3.x compatible octal literals"
Merge "Replace openstack-common with oslo in HACKING.rst"