The gr-autocomplete component re-evaluates suggestions on input changes
via an observer.
Since evaluating suggestions is typically asynchronous (and debounced)
there is a window of time between the keystroke that triggers the
re-evaluation and the time that the new suggestions populate the
`_suggestions` array (potentially replacing any old suggestions).
If a modestly fast typer has typed an input resulting in suggestions,
but then, in quick succession, typed additional text (invalidating the
suggestions and triggering a request for new ones) followed by a
"commit" keystroke (such as [Enter] or [Tab]), then the autocomplete may
incorrectly commit to one of the invalidated suggestions. Doing so would
revert the input value to the text that triggered the old suggestion,
effectively erasing the newly typed characters.
With this change, the suggestion list is eagerly emptied whenever new
input is typed. This ensures that the `_suggestions` array is empty
during the window that new suggestions are inbound.
Bug: Issue 8655
Change-Id: I85bb519985903af719ef287860c04cc97b6cbca8