Improve testing of cinder/utils.py

This commit increases code coverage of cinder/utils.py as well as
removing any use of mox and replacing tests that are more functional in
nature with tests more focussed on testing the function in
cinder/utils.py.

Change-Id: I57bb589fa728d715f07aadc4abd0e27670a3a5b6
Merge "Improve testing of cinder/utils.py"