Add functions to allow buffer sharing between processes

This PR adds entry points to get the underlying ints and fds for a buffer so that they can be passed to another process which can use them to get the buffer, sharing it between both processes.