Add a new SRC_DIR environment variable

All subprocesses will now be invoked with SRC_DIR pointing at the root of the
source directory that they are working on (compiling). This commit also
reorganizes the version environment variables to use the new infrastructure.

Closes #433