Refactors Security Groups into their own module

Pulls security groups and their associated unit tests into separate
submodules intended to make plugin.py easier to read.