iconv: Handle iconv_open failures and substitute encoding names

On AMD64/FreeBSD 9.1 the GNU libiconv library does not know about
'utf8' and iconv_open returned an invalid handle address. The code
attempts to detect cases of the handle being equal to (iconv_t) -1
but this didn't work on AMD64 systems. Add a C-Function to query
the value of (iconv_t) -1 to make the code work for various pointer
sizes.

Grease is using 'utf8' as codec name but GNU libiconv does not have
support to match this to 'UTF-8'. Add some support code to replace
the codec name before calling iconv_open.

Introduce a >>#isValid that checks the iconvHandle for isNil or
the address for being an invalid handle. This should fix a potential
crash when saving an invalid handle and calling release on it.

2013-05-20  Holger Hans Peter Freyther  <holger@freyther.de>

	* Sets.st: Add >>#isValid, >>#codecReplace: and >>#iconvInvalidHandle.
	* iconv.c: Add iconvInvalid C-Function.
	* iconvtests.st: Add test for 'utf8' replacement.