Fix closing HTTP session in Ambari plugin

Change-Id: I4028ff177766c0d6e46d1308b774250375039b10
Closes-bug: #1350388
(cherry picked from commit 85fecd81ffe79cba8171308954819cfdb902e9fd)
Merge "Fix closing HTTP session in Ambari plugin" into stable/icehouse