fixes #1419 with last xhr check and request delay

This pr adds a `lastXhr` object which stores the last ajax request which it uses to check against the incoming responses.

It also increases the autocomplete request delay to 500 ms from the default 300 ms to reduce the number of responses.