session: replace manual file descriptor handling with RestrictedFileDescriptor class
Don't think there's much of a risk of leaking those fds, but making sure can't hurt
Don't think there's much of a risk of leaking those fds, but making sure can't hurt