Settings WebUI: focus on section instead of container

The container was given focus so that after the menu (dialog) closed,
the settings would regain focus and to allow arrow keys to update the
scroll position. This introduced the regression that pressing tab
moves focus to the first control (as well as https://crbug.com/708960
and https://crbug.com/709359 which are fixed in subsequent CLs).
This CL adds a condition that if a section was selected, it will gain
focus, otherwise the container gains focus, as was the preexisting fix
for https://crbug.com/707106 and related changes that closely followed.

Bug: 870732
Change-Id: Ic0ae5b44f2778a56999297018427a9fda9f19eb1
Reviewed-on: https://chromium-review.googlesource.com/c/1284064
Commit-Queue: Esmael El-Moslimany <aee@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602990}
9 files changed