Optional dependency injection

This adds support for optional dependencies using Keystone
dependency injection.

A new decorator for classes is provided.

 @dependency.optional('optional_api_1', 'optional_api_2')

If there's a provider for the dependency, the attribute
will be set to the provider instance, otherwise the attribute
will be set to None.

This can be used in combination with required dependencies.

Related-bug: #1223524
Change-Id: I2b987f10a7bc85efab136ae9e84606e666494246
oauth using optional dependencies

Bug 1223524

Change-Id: Ic0d53fd1d5b3b7a587d33dc230e9ff200782ad4f
only run flake8 once (bug 1223023)

Change-Id: I0f492ad582fa7e609cccacd6d24f6c97bf731a85
Merge "Optional dependency injection"
Merge "oauth using optional dependencies"
Merge "only run flake8 once (bug 1223023)"