Added cloning to database model and methods needed to keep it up to date while the migration operations are processed.

Initially I wrote it having the parameter, and further, each Clone method would add the clone to the cache, whether needed or not. While that looks more "uniform", it is only necessary in some cases. I was thinking that the graph structure is unlikely to change so I removed the parameter and kept it minimal. I can go back to what I had initially if you feel strongly about it, from my point of view it is probably ok either way.