libstd: Get rid of duplication in {peer, socket}_name and remove extra *.