Check for the session (backend) on which the target was running, if it does not exist, we wait for another session to invoke the target.

Also - resolved couple of other problem related to the debugger:
- On cancellation of progress dialog, it was not closing the debugger.
- In direct debugging, the target was invoked without taking care about quotes.

This patch also includes couple of other issues introduced by the earlier patch.
1. Showing the messages multiple times in the message window (Query window)
2. Cancellation of query wasn't working on Query window.