security groups reference

* Implemented security group reference with unit tests.
* Did a lot of code cleanup.
* Wrote unit tests for reference.
* Validate security group rule syntax on the model class and by extension the API.
* Check rule syntax again in vna so we don't crash when malformed rules where added without validation.
* Implemented live security group removal.