HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards

Old versions of aCC need a special compiler flag to get full C++98 template
support as e.g. CMake itself or the Complex and ComplexOneConfig tests need.
The same versions need a special flag to get a proper C++ library, too.
FindCurses: Honor CURSES_NEED_NCURSES when curses is found

Take our CURSES_USE_NCURSES code path when CURSES_NEED_NCURSES is
enabled even if CURSES_CURSES_LIBRARY also happens to be found.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
FindCurses: Detect and satisfy ncurses dependency on tinfo

When ncurses is built with USE=tinfo we need to find "tinfo" as a
dependency of the main library.  Otherwise 'cbreak' is missing:

  ld: ...: undefined reference to symbol 'cbreak'
  ld: note: 'cbreak' is defined in DSO /lib/libtinfo.so.5 so try adding
            it to the linker command line

See https://bugs.gentoo.org/show_bug.cgi?id=468622 for more information.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
Merge branch 'ncurses-tinfo' into release
Tests: Fix name of cache variable.
Help: Fix order of help entries.
Project: Remove extern from static string in feature tests.
Project: Use nullary form of main for compile feature tests.
Project: Fix exit-on-error with compile feature tests.
Features: Decay language flag if requested is not available.

Use the highest standard compile flags available if requested language
version is too new.

This supports use-cases like

 set(CMAKE_CXX_STANDARD 14)

 # Compiled with -std=c++11 with GNU 4.7, which has no -std=c++14
 # or equivalent flag
 add_executable(main main.cpp)

This can be used in combination with preprocessor defines which
communicate the availability of certain language features for
optional use.
cmTarget: Add CXX_STANDARD_REQUIRED to control decay.
Features: Include the language of the compiler in error messages.
Features: Fix test for GNU 4.8.1.
Project: Generate the CXX compiler Id test from multiple files.

This will allow sharing of the logic of the order to test compilers in
and the preprocessor macros used to do that and to determine the
version components.
Project: Split the compiler id detection into a separate function.

This can be extended with parameters to control the output and re-used
in other contexts.
CompilerId: Allow specifying the compiler-specific components to generate.
CompilerId: Add option to generate compiler-id-specific defines.
CompilerId: Guard the platform-default compiler code with a parameter.
CompilerId: Allow specifying a prefix for preprocessor defines.
Project: Refactor C compiler determination into multiple files.