add file type to attributes endpoint
add file type to attributes endpoint

Summary:
Directory listing is slower on NFS that FUSE because readdir returns basically
no info (names of children only). That means most the time clients must
lookup and getattr each entry to actually learn any info about them.

or we Turn on readdir plus which is logically equivalent currently.

buck2 relies on directory listing, and this means buck2 is less performant on
NFS than fuse.

From prototyping thrift is significantly faster. And it allows us to avoid
loading inodes :). So checkout afterwards will also be much faster.

However, buck2 will need filetypes exposed to be able to use thrift. so we are
adding filetype to the attributes api.

we could expose mode bits directly, but buck2 only needs filetype
(regular/symlink/executable) currently.

Reviewed By: fanzeyi

Differential Revision: D35835655

fbshipit-source-id: a38f024edf74496aff0639bf509256700e21f308

facebook/watchman,facebook/watchman,facebook/watchman,facebook/watchman,facebook/watchman,facebook/watchman,facebook/watchman,facebook/watchman,facebook/watchman