Refactor resource loading functions
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

dims/heat,srznew/heat,miguelgrinberg/heat,maestro-hybrid-cloud/heat,cwolferh/heat-scratch,steveb/heat,pratikmallya/heat,cwolferh/heat-scratch,jasondunsmore/heat,rh-s/heat,rdo-management/heat,noironetworks/heat,jasondunsmore/heat,cryptickp/heat,gonzolino/heat,dragorosson/heat,redhat-openstack/heat,rh-s/heat,dragorosson/heat,cryptickp/heat,rdo-management/heat,miguelgrinberg/heat,pshchelo/heat,NeCTAR-RC/heat,steveb/heat,takeshineshiro/heat,openstack/heat,openstack/heat,pratikmallya/heat,srznew/heat,maestro-hybrid-cloud/heat,noironetworks/heat,pshchelo/heat,NeCTAR-RC/heat,gonzolino/heat,dims/heat,redhat-openstack/heat,takeshineshiro/heat