search: typeahead.js code style improvements

* Fixes warnings produced by jshint.

* Breakes too long lines.

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 blur 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>