Do some build graph sanity checks.

Check some invariants after resolving, restoring and change tracking.

Change-Id: I84e92d6f16a96d4a54c928e8cebc06efbf8fde2c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Change cpp.compilerPath back to a string.

Despite its name, this is not necessarily a path.

Change-Id: Ic0f6abe8e4d1ac70a1b0da1aba7c35ea1fe475fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>