normalize iconv handling

Since the signature of iconv() changes between implementations (the
constness of the second parameter, in particular), make use of the iconv
module of gnulib to handle these potential differences.

(This is a reduced version of 57512e778558c5b93cfa360c83836c2cf8fc5908
in libguestfs.)
ruby: fix detection of ruby library

Query RbConfig::CONFIG for "libdir", and use that when trying to link to
the ruby library.  This fixes the libruby detection when it is installed
in a non-standard library directory.

(This is the same change as 3d02e53c48266669675cc237f61ae2c4e1816e66
in libguestfs.)