by using it getSupervisorRPC in a context manager which on python 3
This needs fix from https://github.com/Supervisor/supervisor/issues/1184
we assume that this fix is only on python 3.
On python2, we keep this same behavior of not closing socket explicitly
and leaving it to destructors.
Also re-raise a few error cases that were ignored.