Fixes for autocomplete.

Avoid sending empty term queries to solr when special character filter
returns an empty string.

Better handling of delete, backspace and arrow keys in the basic search
autocompleter. 

Fixed a bug in basic search autocompleter where last keypress wasn't
part of the keyword value.