Implement caching for configuration checks.

svn path=/trunk/tools/build/v2/; revision=83781