ls: implement --group-directories-first for compatibility with GNU ls
Also implement --group-directories which takes a parameter.
"first" is equivalent to --group-directories-first, "last" gives
reversed sorting.
Changes in sorting between elements of the same type (files,
directories) are not intended.
Differential Revision: https://reviews.freebsd.org/D48347