Enhanced autocomplete widget

- Added delay option which will wait before starting a query after each
  key hit.
- Added event triggering when entry has been selected.
- Made index attribute optional, falling back to simple index