[iOS][web] Add a way to remove the WebUI factory

The WebUIIOSControllerFactory only provided a way to register a factory.
When the factory dies (for example in tests), there are no way to remove
the factory, leading a crash the next time the factory is accessed.
This CL adds a way to deregister the factories.

Bug: 943597
Change-Id: Ic7276d3a1597ce02d47229ea63cd3ffdbc36d5fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1533938
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642946}
4 files changed