[Autofill] Use form_util::IsFormVisible to determine if a form is still visible

This improves on our visibility detection after a same-page navigation/AJAX request and shares code with password manager.

Also fixed some tests. It turns out the full action needs to be specified otherwise the code paths are not well tested because of the test harness (navigating to data: URIs doesn't play well with actions).

BUG=539903
TEST=FormAutocompleteTest

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

Cr-Commit-Position: refs/heads/master@{#355368}
4 files changed