Unittests: refactor AWS::EC2::SecurityGroup tests

Refactor mocks for rule creation into separate helper methods.

Change-Id: Ia32639147f12e2a3026b2d8c3efb499d8cea6765
Merge "Unittests: refactor AWS::EC2::SecurityGroup tests"