Dismiss code hints before running a command

This is to fix issue #3426 by dismissing code hints with an event fired before the actual command is executed.
A new command is also added to invoke code hints from Edit menu.