fixes #4155 - associate and disassociate vms using the api

I'm not sure I see a how to associate individual vm's, but this would allow disassociations and mass associations for compute resources. 
I'm not familiar with the possible objects that can be passed as `vm`. It seems you should `vm.identity` or `vm.try(:identity)` if there's a chance that `vm` is `nil` rather than `Array.wrap(vm).map(&:identity))`