CA-118781: revert init order changes

Unfortunately we have to revert the previous 7018eaa and 7ac48731 on
the stricter initialization order.

This is due to some spaghetti calling pattern in our code. In VDI class
and its children, we have the following calling stack:

   Child.__init__ -> Parent.__init__ -> Child.load

When Child.load is called, it assumes that some attributes have already
been initialized, but at this point neither Child.__init__ nor
Parent.__init__ has completed their execution. This code pattern
forces us to initialize those particular attributes in the Child class's
__init___ method before ever calling  Parent.__init__.

This is not pretty, but changing this pattern demands many other changes.
To unblock trunk integration, here we reverted the previous changes.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
CA-118781: Avoid the dangling "path" attribute of class VDI

The self.path attribute is referenced in VDI class's attach
method but it was not defined/initialized anywhere in class.
The correctness then depends on the children classes always do
the right thing (i.e. do not forget to init the path attribute
if they will ever call parent class's attach method directly
or indirectly).

This is considered as a ERRROR level issue by pylint. As a
fix, here we conditionally set self.path in the __init__
method based on whether a uuid argument is passed to the
initializer or not. For VDI classes whose physical
paths/locations have no direct connection with their UUID
string values (e.g. ISOSR, udevSR and SHMSR), they will not
pass any uuid to the parent class's initialiser and will be
responsible for setup the correct self.path/self.location
value by themselves. We want to make sure that their
customized value won't get overwritten here.

Also fixed the indentation suggested by Vinneth.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Merge for CA-116802

GitHub: closes #46 on xapi-project/sm
CA-116160: Python exception in HBA SR create.

len() on dictionary iterkeys is not valid in Python 2.6.
Replaced it with len() directly on the dictionary.

Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #47 on xapi-project/sm
CA-118899: Support UTF-8 iSCSI target names.

Signed-off-by: Rob Dobson <rob@rdobson.co.uk>
Acked-by: Thanos Makatos <thanos.makatos@citrix.co.uk>

GitHub: closes #44 on xapi-project/sm