network.cc: Properly close old fd on Socket assignment operator

Fix thanks to Igor Bukanov. Closes #470.