tests: fix negated test_i18ngrep calls

The helper function test_i18ngrep pretends that it found the expected
results when it is running under GETTEXT_POISON. For this reason, it must
not be used negated like so

   ! test_i18ngrep foo bar

because the test case would fail under GETTEXT_POISON. The function offers
a special syntax to test that a pattern is *not* found:

   test_i18ngrep ! foo bar

Convert incorrect uses to this syntax.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Git 2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup_pager: refactor LESS/LV environment setting

The way the code is structured now, we have to repeat
ourselves in fetching the environment variables (which will
get annoying as we add more). Instead, we can just pass an
empty "env" array (which does not mean "an empty
environment", but "do not add anything into the
environment").

While we're at it, switch the environment list to use an
argv_array, which saves us having manually fiddle the static
array size if we add more entries. This means we'll leak the
memory, but:

  1. It's only called once per program.

  2. We're now leaking heap memory instead of wasting BSS on
     the static array.
setup_pager: set MORE=R

When we run the pager, we always set "LESS=R" to tell the
pager to pass through ANSI colors. On modern versions of
FreeBSD, the system "more" can do the same trick.

Unlike "less", we may be dealing with various versions of
"more" that do not understand the "R" option, but do know
how to read options from MORE (Debian's "more" is an
example). For this reason, we make the setting a
compile-time option (but turn it on by default on FreeBSD).
pager: disable colors for some known-bad configurations

Some pagers do not like the ANSI colors we print. It used to
be that one had to opt into the colors, and would usually
check your pager config at the same time. These days, we
turn on color.ui by default, meaning that some users may see
"git log" output to be broken from the start. They can fix
it by turning off "color.pager", but we should try to make
things work out-of-the-box as much as possible.

The common cause of this is that the user is using "less" or
"more", has setup its config by the environment (so that we
do not override it), but do not include color in their
config.

For other pagers, we simply continue to guess that it can
handle it. This is compatible with the current behavior (and
will keep exotic things like "diff-highlight | less" working
without further config). The downside is that other random
pagers may break.