Security groups/rules implemented.

Reincarnation of #92:
Security groups and rules.

I rebased onto a new branch to keep it clean.