Guard against detached nodes in ve.ce.GeneratedContentNode#doneGenerating

The generation promise can get resolved (e.g. AJAX request can complete)
after the node has been detached. In that case accessing this.model.doc
will fail, so check for this in doneGenerating().

Also attempt to abort the pending promise on teardown.

Bug: 56649
Change-Id: Ia55f1c2c8dc3a3619c0b50795e50fcae4bc6471f
Merge "Guard against detached nodes in ve.ce.GeneratedContentNode#doneGenerating"