Moves all network related code to a seperate library. libdmp-common was getting a mess.