parameterize fileutils removal functions

Currently delete_if_exists() and consequently
remove_path_on_error() only support single files.
So to handle dirs, or trees or higher level operations
it's useful to be able to specify how to remove.

* openstack/common/fileutils.py (delete_if_exists):
Allow passing a removal function.
(remove_path_on_error): Likewise.
* tests/unit/test_fileutils.py (test_dir_present):
Demonstrate/test removal of empty dirs.
(test_remove_dir): Likewise.
(test_remove): Ensure the remove param is honored.

Related:   Idce8d21ae37bfdbb28a2567120a83d1061061904
Change-Id: I0ea2498048f09af5f1b9c1bddba677c5813fb2f8
Proper usage of _resource property in quotas

Use resources instead of _resources. This is necessary because _resources
actually does not contain all resources in VolumeTypeQuotaEngine, and there
is property-method `resources' was introduced for this.

Change-Id: Iac85497a956e7c3a8c58bb38337a63d0d5fabc8f
Merge "parameterize fileutils removal functions"
Merge "Proper usage of _resource property in quotas"