Remove unnecessary explicit definitions or overrides of make variables

CC, AS, and LD are sensibly initialized by make and can be externally
overridden as needed. Don't hardcode gcc.
Honor common make variables from the environment

Instead of overriding CFLAGS etc., append required flags.
Define strtoul return variable with proper type

strtoul returns unsigned long not uint32_t.
Remove effectively dead code from text_to_guid

Before the strtoul call the GUID string has been sufficently checked,
that we know with certainty it won't trigger any of the documented
errors. We know the length and the format, therefore we also know the
maximum return value.
Fix compiler warnings (-Wsometimes-uninitialized)
Add CMake config
Fix build with -Wl,--as-needed

Gentoo uses -Wl,--as-needed which causes the build to fail due to
incorrect link order.
Fix Gentoo QA Notice

QA Notice: make jobserver unavailable:
    make[2]: warning: jobserver unavailable: using -j1.  Add `+' to
    parent make rule.