This fix addresses the creation of 'ghost tasks' - or more correctly, the failure to properly clean up ghost tasks.
There was already code to automatically delete invitation tasks when a site was deleted, but it was no longer working and had no test coverage.
This checkin adds a test case for this issue and also fixes it.
I also added & improved logging in various places.
The bug was in ActionExecuterAbstractBase, where an action run on a non-existent, but non-null, NodeRef was considered to be run on a locked node and hence not run.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@52158 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261