Adapt StatefulConnection class to advance image

Test test_established_tcp_session_after_re_attachinging_sg fails when it
is executed on advance images because launching commands in background
could not be done using the exec_command method
For cirros images it works fine, so the method used will depend on
the tempest configuration

Change-Id: Idf915c34ae6f08c2d1ac86f4c192824090f9d6e6
1 file changed