Reworks the way mutexes work using unique_locks, so that we have better mutex unlocking safety as functions go out of scope; hammers out quite a few bugs in the socket and tcp code, and adds blocking receive functionality to tcp sockets; continues moving the remote client code towards functioning.