Only release when there is no lock on the object

When the widget was unregistered for drag and drop then it would call
Release() on the dropTarget before doing anything else. If the widget
itself did not have a handle then this was not a problem. However in the
case of a widget with a handle then it would call Release() before
the lock on the dropTarget was released which would cause it to crash.

Therefore it is moved so that it is called after the lock is released
to ensure it can be released correctly.

Task-number: QTBUG-13237

Change-Id: Iaec3eb8be3a4ea988218012e973f69cbcdcc45de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>