ec2_group support for egress rules and referring to security groups by name in rules

This patch allows security groups to be referred to by name in rules by using the group_name parameter. If a named security group does not exist, it will be automatically created.

Rules now also support a type parameter to specify whether they are ingress or egress rules. If the type parameter is omitted the rule will be considered an ingress rule.