Add support for ec2 security group egress rules

This patchset add support for egress rules in ec2 security groups. Patchset is split for easy reviewing. There are some minor differences with respect to #6416 and #6598.

Feedback welcome.