Updated gpgkey tests with Factory and using api's for dependent entities
updated test_key_associate_20 test with api's

Updated create/delete/update tests with factory

Updated create/delete/update tests with factory

moved session statement after api calls and collapse tests
Merge pull request #1161 from sghai/gpgkey

Convered GPGKey tests to use Factory and APIs for dependent entities