socket: implement assignment operator

Avoids shallow copies which were causing segmentation faults in CCRTP