Do not store the build graph after an internal error.

If we get an assert, we will most likely want to investigate it further,
e.g. by re-running the build with more debug information etc. However,
if we store the build graph, the input parameters for the second run
will not be the same anymore, and we might not get the same error again.
So we don't touch the build graph in that case to have a more
deterministic behavior.

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