fixing encapsulation for vm model

vm knows about the vcloud_attributes and parent vapp.

Also fixed a bug in vm, where logging in rescue block fails since the
variable we are printing is not available