Fix #79: Node::connect race condition

Conflicts:
	tests/barrier.cpp