fix Cygwin UTF-16 surrogate-pair handling with -i

grep -i would segfault on systems using UTF-16-based wchar_t (Cygwin)
when converting an input string containing certain 4-byte UTF-8
sequences to lower case.  The conversions to wchar_t and back to
a UTF-8 multibyte string did not take surrogate pairs into account.
* src/searchutils.c (mbtolower) [__CYGWIN__]: Detect and handle
surrogate pairs when converting.
* NEWS (Bug fixes): Mention it.
* tests/surrogate-pair: New test.
* tests/Makefile.am (TESTS): Add it.
Reported by: Jim Burwell
dfa: appease a static analyzer, and save 95 stack bytes

* src/dfa.c (MAX_BRACKET_STRING_LEN): Rename from BRACKET_BUFFER_SIZE
and decrease from 128 to 32.
(parse_bracket_exp): Add one byte more than MAX_BRACKET_STRING_LEN
to the length of "str" buffer, to avoid appearance that we may store
the trailing NUL beyond the end of buffer.  A string of length 32
or greater is rejected by earlier processing, so would never reach
this code.  Addresses http://bugs.gnu.org/15307
maint: dfa: improve comments and formatting

* src/dfa.c (add_utf8_anychar): Correct wording/alignment of a comment.
(dfaexec): Add curly braces around multi-line while statement within
a "then" block.
(ANYCHAR): Clarify comment: "." does not match an invalid UTF8 character.
(parse_bracket_exp) Improve comment.
dfa: remove dead disjunct

* src/dfa.c (parse_bracket_exp): Remove dead disjunct.
At that point, we know MB_CUR_MAX <= 1, so the test,
MB_CUR_MAX > 1 && ... is always false.  Remove the disjunct.
maint: change all references: s/POSIX\.2/POSIX/

There is no longer any point in referring to POSIX.N.
POSIX is sufficient.
* doc/grep.in.1: As above.
* src/main.c (main): Likewise.
* tests/file: Likewise.
* tests/options: Likewise.
* ChangeLog: Likewise.
* NEWS: Likewise.
* cfg.mk: Update, to match changed NEWS.
Inspired by Glenn Golden's suggestion in http://bugs.gnu.org/15486
dfa: fix \s and \S to work for multibyte

* src/dfa.c (lex): In multibyte mode, we can't treat \s and \S as we do
in single-byte mode.  Map them to [[:space:]] and [^[:space:]] respectively,
to make the DFA matcher use the regex-matcher for this term.
* tests/multibyte-white-space: New file.  Test for the bug.
* tests/Makefile.am (TESTS): Add it.
This bug was introduced with the addition of DFA support
for \s and \S in commit v2.5.4-112-gf979ca0.
tests: ensure neither \s nor \S matches an invalid multibyte character

* tests/backslash-S-vs-invalid-multitype: New file.
Prompted by the bug report from Roman at
http://savannah.gnu.org/bugs/?40009
* tests/Makefile.am (TESTS): Add it.
tests: add a test for better coverage of some tricky code

* tests/spencer1.tests: Add a non-range bracket expression representing the
same regexp, to cover the alternate code path, the one that does not require
a regcomp/exec call to interpret the regexp.
maint: fix typo in NEWS

* NEWS: Fix/improve example commands in most recent entry.
The LC_ALL envvar setting goes before grep, not before printf.
Don't reference src/ in the second example command, and do specify
the locale.
maint: update bootstrap to latest from gnulib

* bootstrap: Update from gnulib.
tests: extend the multibyte-white-space test

* tests/multibyte-white-space (utf8_space_characters): Add more
single-byte whitespace characters.  Align RHS hex values and
make the sed substitution less rigid, to accommodate.
Also, ensure that grep '\S' exits with status 1.
build: update gnulib submodule to latest
build: port to platforms that predefine _FORTIFY_SOURCE

Problem reported by Brenton Hoff (Bug#15663).
* configure.ac (_FORTIFY_SOURCE): Don't define if already defined.
This is what Emacs does.
build: port shell pattern to Solaris 10

* configure.ac: Don't use unquoted '^' in a pattern, as this
breaks 'configure' on Solaris 10, whose /bin/sh complains about it,
which causes 'configure' to exit even before it finds a decent shell.
Unix 7th edition shell accepted '^' as an alias for '|'.
build: avoid chatter from Automake 1.14

* configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects.
maint: remove now-unused wcscoll module

* bootstrap.conf (gnulib_modules): Remove wcscoll; no longer used.
gnulib: update to latest