Update to infra for C++

Believe these are minimal changes for supporting C++ building and
linking for gcc-local. Need to review if changes are needed for other
toolchains.

Collect cpp files as target sources; if there are any, set the
CPP_FILES_PRESENT flag.

Add rule to generate .o from .cpp in gcc-local obj.mk.
Pedantic flags are C++ specific.

If C++ files are present, use g++ to link the final target.