sm: switch from shm to file-based mmap

To avoid issues with accessing /dev/shm on Linux and for
simpler cleanup, use file-based mmap rather than shm_open().
When creating an connction, we can close the fd after mmap() -
no need to cache it in the connection.
sm: close buffer's file after mmap

No need to cache the file descriptor. Close it after mmap().

Also, during destroy_endpoint(), use the path, not the URI, when
unlinking file names.