This commit fixes an issue with security group rules where the rules
were not being correctly computed due to a typo in the rule map.
Once rules were successfully computed, the rules then needed to be
converted into a Set so they can be correctly ordered.
This commit reverts the patch from #3796.
It has been discovered that multiple rules are being reported out
of order when the configuration is applied multiple times. I feel
this is a larger issue than the bug this patch originally fixed,
so until I can resolve it, I am reverting the patch.
This commit enables security groups to be deleted in a safe way by
checking their state over a period of time.
This fixes occurrences when the API says the instance is deleted but
it is still in the process of being deleted by OpenStack and thus the
security group returns an error saying that there are still instances
attached to the group.