Support syntax CCACHE_COMPILERCHECK=hash:<random_hash_string>

This can be faster than running a command directly, because the
command to run might just produce the same result for every ccache
invocation. By reading it from config file or environment variable
we can just run that command once and store the result in the string
following "hash:" and reusing it.

For example when we want to use clang revision for clang built from
SVN trunk, we can just call clang --version once and store the
revision number like:

  export COMPILERCHECK=hash:218707

(Assuming 218707 is the current build revision.)