Check the selectedUser before calling TaskService

When the selectedUser is null, deleteUserIdentityLink() should be called to remove the origin assignee of task.
If the origin assignee and selectedUser are both null, do nothing.
Merge branch 'patch-2' of https://github.com/cheshenglin/Activiti
Small change