Improve handling of changes to restored build graph.

Instead of painstakingly inserting new product pointers into an existing
build graph, do it the other way around and put existing build data into
the newly resolved project. This is much more robust.

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