If color.mode=auto in the config (this is the default) then color.py currently
checks if using windows, and if not, uses 'ansi'. This means that to get
terminfo-based terminal support, one has to specify color.mode=terminfo
explicitly; this enables several warnings if a user's terminal does not actually
have support for terminfo (for example, we failed to load curses, or the
terminal does not have a 'setaf' entry).
If color.autoterminfo is True, we will attempt to use terminfo, and *silently*
fallback to 'ansi' if it is not viable.
This patch does nothing to change the ui.debug messages that are output if
terminfo is chosen but the terminal does not support one of the "default"
features, such as 'dim' or 'invis'. Therefore, the fallback to 'ansi' if
terminfo is not available will be silent, but if terminfo *is* available but
does not support every feature, invocations with --debug will still see/start
to see "no terminfo entry for <feature>" messages.
For the real reviewer - this combines with modewarn() above to do the silent fallback promised above.