Fix popping up autocomplete if input not selected

If the user typed in the autocomplete input but subsequently blurred
the field before results came back from the server (by, say, tabbing
to the next form element), the asynchronous return of results would
end up rendering the suggestion list anyway. This is jarring and
unexpected behavior. This commit fixes this bug.

Change-Id: I3534e8ef12ff3aab565f332f29b8c01043ffde1c
Reviewed-on: https://gerrit.causes.com/19108
Reviewed-by: Alex Wallace <alex.wallace@causes.com>
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Tony Wooster <tony.wooster@causes.com>
Fix caching bug in use of `paramName`

This commit fixes a bug whereby the `paramName` option wasn't being
used when retrieving cached query results. This manifested as queries
missing the cache when they shouldn't (because they were inserted on
`result[paramName]` but retrieved via `result.query`).

Change-Id: I30fac4cb1de45533d2373e1293e13362b13e76a8
Reviewed-on: https://gerrit.causes.com/19109
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Tony Wooster <tony.wooster@causes.com>
Add `onShow` and `onHide` callbacks

This commit adds `onShow` and `onHide` callbacks which are triggered
when the suggestion list is shown or hidden.

Change-Id: Ia35906b47696c3f71bb6a944bbfb493557d325be
Reviewed-on: https://gerrit.causes.com/19120
Reviewed-by: Tony Wooster <tony.wooster@causes.com>
Tested-by: Tony Wooster <tony.wooster@causes.com>