CLOUDSTACK-5121: There was one wrong initialization of cloudstackConnection.

The bug mentioned is causing test cases to fail.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Fixed few indentation errors and removed unwanted imports
Template/ISO download fails cause the object to disappear from UI in 4.2

Signed-off-by: Koushik Das <koushik@apache.org>