Simplify key handlings in code hint manager.

Set lastChar for "enter" and "tab" keys regardless of whether we're in a hinting session or not. This fixes issue #2691.

Remove code that dismisses code hints on pressing some keys with modifier keys. So we no longer dismiss code hints when a shortcut is pressed. We will have to fix the issue of code hints dismissal with another solution, but definitely not with key handling. This change fixes issue #2539.