search: typeahead.js code style improvements

* Fixes warnings produced by jshint.

* Breakes too long lines.

* Removes unused variables.

* Updates comments.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
search: requirejs for search typeahead

* Modifies search/search_parser.js, and search/typeahead.js to be
  compatible with requirejs.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
deposit: switch to typeahead from requirejs

* Makes form.js using twitter typeahead through a requirejs
  dependency.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
base: removal of typeahead.js from bundles

* Removes twitter's typeahead.js from bundles as it is only used with
  requirejs now.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
search: fix of undefined query_range in typeahead

* Initializes query_range in the constructor.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
search: fix for improper suggestions merging

* Synchromnizes internal twitter's typeahead query variable on query
  change.

* Deletes reseting query value to the complete input field value in
  special cases.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
search: fix for stucked focus on the search field

* Prevents setting the caret position by typeahead on blur event.
  Changing the caret position in this situation is not needed, and
  causes the field to focus back.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>