autocomplete: Fix values in input

This fix is twofold:
- Clicking outside of the dropdown can cause stale value in hidden input
- When an empty value is selected, clear the displayed input to indicate
  non-selection.