Implement cxx: directive and related auto-detection of tools.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Enable -Weffc++ where it is supported.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>