* Use `Danbooru.Autocomplete.render_item` for all menu item rendering.
Fixes usernames not being colorized when completing mentions, and post
counts not being shown when completing pools on the /pools page.
* Make the /pools page autocomplete pool names the same way that the
pool:<name> metatag does. Previously autocomplete on the /pools page
listed most recently updated pools first; now it lists largest pools first.
* Move all autocomplete code to autocomplete.js.
* Mark autocompleted fields with `data-autocomplete="<type>"` attributes,
instead of hardcoding input field IDs in the javascript.
* Disable autoFocus. This means that the first item in the autocomplete
menu isn't automatically selected.
* Add Tab keybinding, to make the Tab key work as normal with autoFocus disabled.
* Fix the Enter key to 1) insert the selected tag when inside the
autocomplete menu, and 2) submit the search as normal when not inside
the autocomplete menu.
-Otherwise, the last valid autocomplete result will remain
--Causes incorrect results on Tab/Enter completion
-This clears the autocomplete results instead
Previously we patched the jqueryui-autocomplete library in order to
customize how the Tab and Enter keys behaved. Specifically, we wanted to
prevent the Tab key from moving the focus out of the tag input box, and
we wanted to prevent the Enter key from submitting the page when editing tags.
These things can achieved without patching the library by using
`event.preventDefault` and `event.stopImmediatePropagation` to prevent
other event handlers from running after these keys trigger the
`autocompleteselect` event.
- Add parent metatag defaults any and none
- Add missing user-based metatags to user source
- Remove all negative metatags since the prior code strips the '-'