CA-118762: Bring self.ty back

My previous pylint change 96e56bf7 replaced self.ty as it was not defined
anywhere in the VDI object. But this breaks some horrible hack in the
underlying layer, which was probably implementated that way for backward
"compatability" reason by itself.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>
CA-118781: Initialize parent class first

Another incompatability issue introduced by my pylint serie. On the
other hand, the root cause was some bad code manifested due by this
change.

In some subclass of VDI.VDI, we set some fields before initializting
the VDI.VDI parent class, so that these fields might be overwritten
during the parent class initialization.

As a common rule of thumb, we should generally do parent class
initialization first and then do overwritten and extention in
the following steps in the children initializor.

And any information essential for parent class initialization should
be defined as a parameter of the parent __init__ method. E.g. uuid
is a predefined parameter of the initialization method in the parent
class (VDI.VDI), but many children classes still don't use this
parameter, and instead do uuid assignment in the children classes
instead and then call the parent initializor. This patchset doesn't
correct these issues for the moment, but we should pay attention to
this, otherwise we might get bitten in the future.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #43 on xapi-project/sm