Changed  to  becuase  is not defined yet.
Added start io_thread if is stopped and stop and start if it is connecting
Merge pull request #4 from martinarrieta/master

glb_cib_master instead new_master and start io_thread if the io thread is stopped or reconnecting.