Add autoconf check for setsid().

Because of a historical typo, the simpler code path in untty()
which uses the setsid() all-in-one call has never been used.
Enable that check, so it will get used instead of the more
complex setpgrp()/ioctl() pair on most modern OS's.