Settings > Internet: Fix certificate updates and improve selection.

This fixes a bug where certificate updates were not triggering a refresh
in the new mojo based JS.

While testing that I discovered that the current default certificate
selection logic is broken. This is a subtle thing so was not noticed
previously. This fixes the logic, cleans up some code, and adds some
tests.


Bug: 1001598
Change-Id: Ib81d7f6e093e1e5837d5272c848a3422d6a80b5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825120
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700040}