Adds hacking check for api_version decorator

Because of the implementation of this decorator and the controller's metaclass,
the api_version decorator must be the outermost (ie first) decorator wherever
it is used. This patch adds a hacking check to ensure that this is the case.

This decorator is intended to be used on multiple methods with the same name
which offends F811, so '#noqa' is needed too. This will be fixed in a separate
patch.

Bad:
    @some_decorator # noqa  <-- '# noqa' to avoid F811
    @api_version("2.5")     <-- Error, needs to be the first decorator
    def my_api_method...

Good:
    @api_version("2.5") # noqa   <-- this line still needs '# noqa' for F811
    @some_decorator
    def my_api_method...

Change-Id: I579c0061f03d788c477c5424d4d00ec7a6e721e1
Doc: minor fixes to unit testing devref

The unit testing devref had a bit of inconsistent formatting, and a reference
to HACKING.rst which could have been linkifed.  This patch fixes both of those,
and additionally the examples have been updated to reflect the recent split
into functional and unit tests.

Change-Id: I15129808d0d1271c1223e7ab8d8532f8cb2f7293
extract fixtures from nova.test to nova.test.fixtures

Start extracting all the setup code in note.test into fixtures which
will let us decompose test setup (and have test base classes that
don't setup everything).

This creates new OutputStreamCapture fixture and StandardLogging
fixture and unit tests for both of them plus tests for the exiting
Conf fixture.

H305/306 have to be turned off because hacking import rules are broken
and continue to believe that fixtures is a nova module not the
absolute one.

Change-Id: I97fdacdf5a6ad2957b0efa1e21ae084d4eb04ab9
move ServiceFixture and TranslationFixture

Move these into the new namespace. No additional testing added at this
point.

Change-Id: I0a45dab39745591a55ffc91b31aed8df5179767a
move all conf overrides to conf_fixture

Some config overrides were in conf_fixture, and some were living in
test.py:setUp. If we are globally overriding conf variables we should
do it in one place, the fixture.

Change-Id: Ief66e2245179a37eae60bafaf9e8f452d89319a7
Remove support for deprecated header X_ROLE

X_ROLE support was deprecated in 2012
(bc0ba55ae6ce7b9b9bf5c9dd359f9d812ac8d18d) we are overdue in removing
support for it.

Change-Id: I81d1bb4eb4ac7278c02e3e937f74aeadbd20c0f5
Clarify point of setting dirname in load_standard_extensions

Changing dirname to alter how os.walk visits directories is a little
known feature, so add a note inline explaining how it works.

This came up because someone filed a bug saying this block of code was
confusing.

Closes-Bug: #1399546
Change-Id: I4cab323fcc7a4e2aab2ca7c36d6b9505b6a05bcb
Merge "Remove support for deprecated header X_ROLE"
Merge "Doc: minor fixes to unit testing devref"
Merge "Adds hacking check for api_version decorator"
Merge "Clarify point of setting dirname in load_standard_extensions"
Merge "extract fixtures from nova.test to nova.test.fixtures"
Merge "move ServiceFixture and TranslationFixture"
Merge "move all conf overrides to conf_fixture"