Bug fix for tracking the current active transport

Earlier, while unloading the plugin, all the transports were closed
irrespective of the current active transport. Now flags have been added
to keep track of the current active transports and only those are closed

Signed-off-by: Sateesh Kavuri <sateesh.kavuri@gmail.com>