Fix race condition with self.connected on TCP transport
Fix race condition with self.connected on TCP transport

There is a race condition that occasionally happens when using
the TCP transport. When using the TCP transport, it will fire the
`__master_connected` event before returning from tcp.py's
`AsyncTCPPubChannel.connect_callback`. What sometimes happens is
that the event handler for `__master_connected` is executed before
the control is returned to `eval_master` in master.py. If this
happens, `self.connected` is not yet defined, since `eval_master`
defines it. The event handler for `__master_connected` tries to
access the not yet defined `self.connected` and an exception occurs.

One possible solution is to use `hasattr` to check if `self.connected`
is defined before accessing it in the `__master_connected` handler.
However, I think it is cleaner just to set `self.connected = False` in
`Minion.__init__`, that way this variable will be defined in all cases
and can be relied upon.

Signed-off-by: Sergey Kizunov <dfddabaa9af05982b01940b837a87844148069c9@ni.com>

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt