[amber-ctl] restore link local scopes in repo urls

If the client is provided with a link scoped url, the server won't see this,
and generates a configuration containing unscoped urls. This change
reintroduces scopes to the urls if they match against the unscoped versions.
If there is any failure in matching, we bail out and use the server supplied
url as-is.

Test: amber_urlscope_test
Bug: NET-2042 #comment amber_ctl preserves scopes when configured by url
Change-Id: I48efea1a0602c731941f07bf986dfba34ca2d8e6
4 files changed