Fix a number of resource leaks reported by Coverity
CLOUDSTACK-6887: Fixing account cleanup issue across multiple test cases