rbd: simplify configuration and use librbd and librados
Add an rbd_ceph_conf options to mirror glance configuration, and use
the existing rbd_user option to choose how to connect to the cluster
instead of relying on an environment variable. Use these settings
when running command line programs and when connecting via librados.
Use absolute imports so that importing the python librbd bindings
via 'import rbd' does not try to import cinder.drivers.rbd again.
Create some convenience wrappers to simplify librbd and librados
error handling and cleanup. Using these everywhere also simplifies
testing. Mock out all the librados and librbd calls in the tests
so these libraries don't need to be installed.
Remove the local_path() method since it's never used. It was
left over from nova-volume.
There are only three things still relying on the command line:
- importing an image
- exporting to an image
- getting monitor addresses
Importing and exporting on the command line include zero-detection
that would be little benefit to replicate here. librados and librbd
don't have a simple interface to obtain the monitor addresses, so
leave that to a command line tool as well.