tests: port to bourne shells whose printf doesn't grok hex

Use octal escapes, not hex, in printf(1) format strings,
and in one case, use $AWK's printf so we can continue
to use the table of hex values.
* tests/char-class-multibyte: Use printf octal escapes, not hex,
for portability to shells like dash and Solaris 10's /bin/sh.
* tests/backslash-s-vs-invalid-multitype: Likewise.
* tests/surrogate-pair: Likewise.
* tests/unibyte-bracket-expr: Count in decimal and convert to octal.
* tests/multibyte-white-space (hex_printf): New function.
Use it in place of printf so we can retain the table of hex digits
without hitting the limitation of some bourne shells.
Reported by Paul Eggert in http://bugs.gnu.org/15690#11
maint: clean up an ugly 'while' condition

* src/main.c (get_nondigit_option): Separate a slightly baroque
"while" expression into two separate statements, both inside the loop.
tests: port more tests to bourne shells with hex-challenged printf

* tests/pcre-utf8: Convert the hex \xHH literals for the euro symbol
to octal \OOO.
* tests/turkish-I: Likewise for "I with dot".
* tests/turkish-I-without-dot: Likewise for another Turkish I: U+0131.
build: avoid duplicate -funit-at-a-time etc. options

* configure.ac (WERROR_CFLAGS): Don't add -fdiagnostics-show-option
and -funit-at-a-time, as Gnulib does that for us now, and we're
merely piling on duplicats.
build: port to AIX

Problem reported by Pavel Kharitonov in <http://bugs.gnu.org/15690#68>.
* src/Makefile.am (LDADD): Add $(LIBTHREAD).