Caching recent searches for autocomplete

Added new panel at autocomplete with recent searches, minlength for
autocomplete changed to 0, but will do request to database only if 2+
chars in string. also did little changes at jquery.tagsinput
i see in future we using restrict_to as array, so if we pass restrict_to any other type (including 0 and false values) and skip that 'ifs', we will get error in line 53. why shoud we care about value which we cant use right?