Fix a crash by search event handler for <input type=search incremental>.

We had a crash in SearchInputType::didSetValueByUserEdit().

Dispatching a synchronous event here is dangerous. This CL makes the
non-standard 'search' event dispatching asynchronous in the following cases:
 - The input value becomes empty.
 - The form is submitted implicitly.
Basically 'search' event is triggered by input value changes, and is dispatched
asynchronously by a timer.  So, the behavior change should be acceptable.

BUG=570427
TEST=automated

Review URL: https://codereview.chromium.org/1529373002

Cr-Commit-Position: refs/heads/master@{#365773}
(cherry picked from commit dd6acb021e38e8181684026899fdef556099e408)

Review URL: https://codereview.chromium.org/1537313002 .

Cr-Commit-Position: refs/branch-heads/2564@{#405}
Cr-Branched-From: 1283eca15bd9f772387f75241576cde7bdec7f54-refs/heads/master@{#359700}
4 files changed