telldir return value and seekdir second parameters are of type long

not off_t .. since a pretty long time.
Portability fixes

- <features.h>  is Linux specific
- Define __THROW for non glibc based systems
Portability fix: <alloca.h> is Linux specific
attr_list / attr_listf: Fix cursor off-by-one error

When an attribute cannot be added to the buffer in attr_list() or attr_listf(),
we need to retry adding the same attribute on the next attempt, except when we
didn't make progress.

Reported-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
attr: Don't report a NULL attribute name when -l (list) fails