compat: add proper work-around for missing strndup

Some plaforms (such as OSX 10.6) lack the strndup() function.

This patch borrows and adapts the strndup.c code from the libiberty. The
work-around can be enabled via configure (and config.make.in), via the
config.make file by adding the line 'NO_STRNDUP=y' or when calling make
by adding 'NO_STRNDUP=y' to its parameter list.

Fixes #286

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
argv: revert part of a3079e2

Since we have compat_strndup(), let's revert part of a3079e2 which used
malloc() + strncpy() instead of strndup(), in argv_remove_quotes().

In the meantime, constify arglen and unquotedlen.

Refs #286

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Merge remote-tracking branch 'vivien/compat/strndup'