More thoroughly test node_{connect,detach}_network

At least one thing is not yet checked in the functions, nor tested for:
checking that the projects match.
More thoroughly test headnode_{connect,detach}_network

As for node_{connect,detach}_network, projects are not checked.