Refactor resource loading functions

All logic related to resource loading is currently put into
resource_mapping functions in each resource module and it doesn't
return the mapping information if the dependencies for a given
resources are not satisfied.

This refactors the way resources are loaded, so that the mapping
information is always available and if the dependencies are not met,
another function can be used to convey that information to heat:
available_resource_mapping().  To keep backwards compatibility, if
available_resource_mapping() is not callable for a given resource
module, the previous resource_mapping() will be used instead.

This allows the mapping information to be used in other places, such
as tests (without the need to hard code the mapping information when
registering the resource for the tests) or doc generation (to allow
the resources to be loaded even without their dependencies).

Related-Bug: #1271226
Change-Id: Iabd3da70f7ba35e0b43a2409e170be7f41a351a6
Fix resource mapping for Rackspace

resource_mapping() always returns all existing resource names and
their classes. available_resource_mapping() takes the dependencies
into account and only returns the ones whose dependencies have been
met.

Partial-Bug: #1271226
Change-Id: I3a7467e87f7ff81badd51f121ecea98f2924e506
Fix resource mapping for Docker

resource_mapping() always returns all existing resource names and
their classes. available_resource_mapping() takes the dependencies
into account and only returns the ones whose dependencies have been
met.

Partial-Bug: #1271226
Change-Id: I3d785d92f1d30a3caf4cb0f7721c66c9dda294c3
Change Docker resource mapping name

Removing the OS:: prefix since this is not an OpenStack-provided
resource.  Also remove hardcoded resource mapping name in test.

Partial-Bug: #1271226
Change-Id: I5691a08df3700f896ca1fe6efec4487d44617d6d
Add Docker resources to docs

Change-Id: I912fbc8624d93f16e05cb00f886eed6142dd0793
Partial-Bug: #1271226
Restructure contrib/ directories

contrib/ directory does not follow any standards and will make it
harder to programmatically install plugins on devstack.  The current
structure can also cause namespace collisions when loading them.

This moves all plugin modules to a folder with the same name under
their directory (e.g. contrib/rackspace/rackspace), allowing
requirements, readmes, and other files to be separate from the actual
code.

This also helps to avoid namespace collisions when loading all the
plugins, since all plugins will be under their namespace in the heat
package.  Example:
  heat.engine.plugins
  heat.engine.plugins.docker
  heat.engine.plugins.marconi
  heat.engine.plugins.rackspace

Co-Authored-By: Anderson Mesquita <andersonvom@gmail.com>
Related-Bug: #1271226
Change-Id: Ifc8e3ca388253be82471651737da5d399c7cfb98
Generate docs for contrib plugins

Extend write_autodoc_index to take the contrib plugins into account
and force load all resources - both built-in and contrib - in
ext/resources.py.

Partial-Bug: #1271226
Change-Id: If93dcae52bc573e2673d7fd76a0db62d5fc68115