Extract cxxflags method from cflags method
Pass optimization and arch flags during configure

Closes #24106.
cairo: no longer require stdenv when building universal
erlang: remove superenv workaround
vnstat: also install vnstati

Closes #23948.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>