fts: provide dirent.d_type via FTSENT.fts_statp, when possible
* lib/fts.c (D_TYPE): Define.
(DT_UNKNOWN, DT_BLK, DT_CHR) [HAVE_STRUCT_DIRENT_D_TYPE]: Define.
(DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK): Likewise.
(s_ifmt_shift_bits): New function.
(set_stat_type): New function.
(fts_build): When not calling fts_stat, call set_stat_type
to propagate dirent.d_type info to fts_read caller.
* lib/fts_.h (FTSENT) [FTS_DEFER_STAT]: Mention that
fts_statp->st_mode type information may be valid.