sm: refactor connection headers

The receiver can determine the sender's path. With that, they can
build the directory path that has sock and fifo as well as extract
the pid and id to attach to the shared memory buffer(s).

Refactor the header so that the IDs do not move and can be echoed
on reply.