Remove duplicate barrier implementation
Remove unused barriers
Wait for worker threads to finish connecting

A target thread should wait for all of its workers to finish
connecting before returning from its init function. Synchronization is
accomplished with a new barrier,
td_target_worker_thread_connected_barrier.