By explicitly setting a C standard version we avoid any potential for issues/differences in libraries that may come about due to C STD version, as well as avoid potentially being opted into newer code / features in libraries when compiler defaults change (i.e as of 11.0.0, Clang now defaults to gnu17 over gnu11). This should be a no-op for our release builds, because it's just explicitly setting the default that is already being used. However this is relevant for anyone building depends with a newer compiler. I found one broken __STDC_VERSION__ check in the miniupnpc header. At the same time, add CXX_STANDARD for setting our C++ standard, and use that over setting -std=c++17 for cxx packages.
Backport of core#22380.
We use gnu11 as a C standard because OpenSSL needs it and we can't override it without adding lots of maintenance.
Depends on D17210.