Implemented api.node_{connect,detach}_network.

These aren't tested; the point of this is more to act as a blueprint so
the members of our team who aren't as familiar with the data model have
something to work off of - per my conversation with Peter and Orran, I'm
going to ask the others to finish this, while I move on to other bits of
functionality.

This includes a change to the spec; detach_network no longer needs to be
given the network label. Instead, it just detaches whatever network is
there.