This is the cherry pick merge for the M73 branch which was approved here: http://crbug.com/927215

[Autofill Assistant] Fix delayed prompt state issue.

Before this patch, the controller would stay in the running state
between the end of a script and the time runnable scripts were found.

In practice, for users, this meant that the website could be available,
but keyboard could be unavailable until a runnable script is found.
During that time the progress bar should have been pulsing but wasn't.

After this patch, the controller enters the prompt state immediately
after running a script, starting the pulsing and making the keyboard
available right away.

The cost of this is that in some corner case, the state can switch to
the prompt state then quickly enter an error case.

Bug: 122825639
Change-Id: Id4927a750370ec59e5c1216ebac01d54e377b2f3
Reviewed-on: https://chromium-review.googlesource.com/c/1442711
Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
Reviewed-by: Mathias Carlen <mcarlen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#626996}(cherry picked from commit ba1715e2e1d192e2564252c91186fd1e4e184df2)
Reviewed-on: https://chromium-review.googlesource.com/c/1449651
Reviewed-by: Stephane Zermatten <szermatt@chromium.org>
Cr-Commit-Position: refs/branch-heads/3683@{#112}
Cr-Branched-From: e51029943e0a38dd794b73caaf6373d5496ae783-refs/heads/master@{#625896}
2 files changed