Simplify characterCode lookup

Reduce String.fromCharCode that can’t be optimized by the minifier.
Combine single path conditional
Remove unused variable

It is only set to empty then passed
Add `bookmarked` class to bookmarks button. Also remove duplicated code,
use fewer observers.
Merge pull request #2071 from nschonni/autocomplete-js-cleaning

Autocomplete js cleaning