Settings: Prevent All Sites entries being stuck in an expanded state.

r574073 updated the all sites page to use an iron-list, which allows
parts of the DOM to be re-used as the user scrolls down the page and
loads additional all sites items. However, since the expandable list in
each site-entry is stored separately (i.e. not in the iron-list item),
this value can get stale when an already expanded entry is re-used in
an ungrouped site-entry, resulting in a site-entry with a single origin
listed getting stuck in an opened state.

To fix, check when the site-entry changes iron-list items and close the
expandable list if the iron-list item is ungrouped.

Bug: 835712
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: I2bb33b60623e2fb12487e730ec122391a1d76660
Reviewed-on: https://chromium-review.googlesource.com/1134644
Commit-Queue: Patti <patricialor@chromium.org>
Reviewed-by: Hector Carmona <hcarmona@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574839}
3 files changed