jquery.suggestions: Support caching results to save http requests
When typing the same thing multiple times, or when pressing backspace
(thus reverting to an earlier known value), or otherwise ending
up with the same value, we can re-use the data we already used.
Doesn't happen in the basic case of typing one thing without mistakes
and selecting a results, but happens more than one might think.
People are often impatient, or even use the suggestions as their
search results and based on that might try something else and then
go back (e.g. try "Foo", find a good result but not ideal, try "Bar",
even worse, go back to "Foo", select "Foo thing").
During this, requests for "B", "Ba", "F", "Fo" and "Foo" would be
fired more than once (B-Ba when backspacing, F-Fo-Foo when typing it
the second time, or simply using ctrl-Z a couple times).
By default cache disabled (individual users of this plugin have
to opt-in). When enabled it defaults to an expiry of 1 minute.
Also:
* Cleaned up computing of $textbox.val(), it was being computed several
times in a synchronous block.
* Simplified bool cast from foo ? true : false, to !!foo.
Bug: 65581
Change-Id: Ib10c65f6ab31773b7f517b2f9c3cc7c7b93c6d39