fix building of revbuild.h header when $MODE not set

factor out useful environment variables into environment.linux.makefile - update kernel makefiles to use this so we always have the correct path to the cache folder ($CACHE_DIR)