Stop event propagation when ESC is pressed

Without this change to tooltip, using a component such as typeAhead inside a modal causes expected behavior when the ESC key is pressed.

* Expected behavior: typeahead dismisses and modal remains open.
* Actual behavior: typeahead and modal both dismiss (both handle the ESC key).

The corresponding change to modal was made for behavioral consistency to avoid potential similar issues.