sdk: refactor invocation flow #949189, #949187

This change introduces workaround for the race conditions
on [1] and [2] which are caused by the non ability of the
former to supply tread safe environment as seen in #949187
and #949189.

https://bugzilla.redhat.com/show_bug.cgi?id=949189
https://bugzilla.redhat.com/show_bug.cgi?id=949187

[1] cookielib.DefaultCookiePolicy
[2] httplib.HTTPConnection

Change-Id: I4c50e04ef763d4f572cfb4a5e4df0bb045401453
Signed-off-by: Michael Pasternak <mpastern@redhat.com>