Improve use of temporary_file and temporary_dir

cinder/image/image_utils.py contains the functions temporary_file and
temporary_dir for use with handling temporary data.

temporary_file automatically creates files in CONF.image_conversion_dir
and will create CONF.image_conversion_dir if required. This commit
removes duplicate code that checks for/creates the dir before calling
temporary_file. This commit also replaces code that duplicates the
functionality of temporary_file with temporary_file.

temporary_dir requires that CONF.image_conversion_dir exists. This
commit adds a check to the function that creates it if it is missing.

Change-Id: Idecba85e19a0fe16dfc9f840913857137bfeee1b
Convert test_image_utils tests to mock

The tests for cinder/image/image_utils.py mainly use mox. This patch
replaces the tests in cinder/tests/test_image_utils.py and adds
additional tests that use mock.

This commit removes the following trivial functions that were only used
once within image_utils and don't appear to provide any tangible
benefit:
    - file_exist
    - rename_file

Change-Id: If6c6e7370ac253f332ed532c0ca3956624267442
Remove iscsi_helper calls from base iscsi driver

There are a number of drivers that inherit from the base
iscsi driver, using the base implementation of initialize_connection
and terminate_connection.  These drivers also don't have iscsi_helper
defined.

We've kept all iscsi_helper specific code in the tgt helpers
themselves, or in the various versions of the LVM driver
which is where they belong.

Over time however there have been some iscsi_helper specific
calls that have crept in to the base volume.driver:ISCSIDriver
class.  These were LIO specific calls and as a result when a
configuration is set with multi-backend to use lioadm as the
target helper, or even if it's not used but the default iscsi_helper
is set to lioadm the initialize_connection and terminate_connection
calls will try and access the LIO specific calls and raise because
the drivers inheriting from this class don't have target_helper
members.

This went unnoticed mostly because there's no significant LIO testing
in place and there were no distros setting LIO as the default iscsi_helper,
it appears that this has changed however.

This patch moves the LIO specific calls back where they belong
and keeps the base ISCSIDriver generic.  I've also added a test
case for this in the SolidFire driver because it's impacted by
this.

Change-Id: Ibe010b62bb2518685753dd515326e56ffcc99cea
Closes-Bug: #1400804
Uncouple scheduler stats from volume creation

Capture and report scheduler stats independently from volume creation.
Without this scheduler stats were not reported until the first volume
creation and were subsequently only updated each time a volume was
created.

Change-Id: Ia1a809ba10e0595e6c255fde683f7c252377ac09
Fixes-bug: 1402790
Fixes-bug: 1402806
Catch ImageNotFound exception when deleting rbd volume

When deleting a rbd volume it is possible for remove() to
throw a ImageNotFound exception. In this case we should
catch the exception, so the volume delete can continue.

Closes-Bug: 1403172
Change-Id: I32cf9d3774c129cda4449996ceeb4b43b7e42904
Fixed wait for job completion in VMAX driver

The VMAX driver used non-thread-safe variables in the wait for job
completion routines, resulting in failures or timeouts during concurrent
operations. This patch fixed the problem.

Closes-Bug: #1393568
Change-Id: I444b961a6543886da35fb44127b1cf7c509ce8d8
Updated from global requirements

Change-Id: I90b81f0c11fa7e7d0bb9a0e24dd9c9a4dd90de34
Merge "Uncouple scheduler stats from volume creation"
Merge "Remove iscsi_helper calls from base iscsi driver"
Merge "Fixed wait for job completion in VMAX driver"
Merge "Improve use of temporary_file and temporary_dir"
Merge "Catch ImageNotFound exception when deleting rbd volume"
Merge "Convert test_image_utils tests to mock"
Merge "Updated from global requirements"