tests: Enable using our custom Transport class for async testing.

Signed-off-by: Joe MacMahon
elasticsearch: Fixed Transport and Connection class to pass tests.

Signed-off-by: Joe MacMahon <joe.macmahon@cern.ch>