Add the -d flag (limit display depth) for compatibility with FreeBSD,
DragonFly, NetBSD and GNU coreutils, even though it's not POSIX.
Actually, this simplifies the code rather than complicating it.

Because -a and -d need not be mutually exclusive (as observed by
millert@) and -s is identical to -d 0, -a and -s are no longer
mutually exclusive, but -as and -sa are now the same as -s.
That is explicitly allowed by POSIX.

Based on a patch from William Orr <will at worrbase dot com>,
but extensively massaged and HISTORY added by me.

feedback and ok millert@

imported to Bitrig by patrick@, ok'd by pedro@