Cleanup and refactor methods in unit/test_security_groups_rpc

We had strings repeating all along the code which already were
in constant form, those have been refactored. Also global configuration
changes are now handled by functions to enhance code readability.

Change-Id: I0d4e508cda2537abe431f04a278ba2e1d2f5d97d
Merge "Cleanup and refactor methods in unit/test_security_groups_rpc"