Get rid of the "msg" URL parameter

The editing interface for relationship types and relationship
attributes appended "?msg=created", "?msg=updated", "?msg=deleted" to
the URL that it redirected to after an edit. This was apparently done
(in commit 2565cde4f9ccf9c6899ed82cd56114b53c264e37) so that the new
page could show a banner with an appropriate message, but that feature
has never been implemented. It's also no longer necessary since a
message acknowledging the successful edit will be shown in any case,
so this commit removes the URL parameter altogether.
MBS-7684: Only close HTML span tags that are open

The conditions for when to insert <span class="name-variation"> and
when to insert the corresponding </span> were out of sync, in the
link_artist and link_recording macros. This could cause a lone </span>
closing tag to be created, which then could prematurely terminate a
different <span>.
Remove unused ar.js file

This was for the old edit/create relationship pages.
MBS-7691: OZON.ru URLs are automatically edited to add partner=musicbrainz

Overrides affiliate_url instead of url so that urls aren't returned
modified in the webservice.
MBS-7698: Release editor asks for confirmation to leave even if there are no changes (but the release has URL relationships)

The problem is that when the original and new edit data for the URLs are
diffed, the original data includes gids for the URLs and the new data
doesn't.

The reason this happens is that the code to cache entities in
root/static/scripts/common/entity.js handles URLs weirdly. It'll cache
the URL under its gid if the data includes a gid, otherwise it uses the
name. So you could end up with two cached instances for the same URL.

The main fix involves caching URL entities under both their names and
gids. This is sufficient to fix the bug, but I also fixed the place
in externalLinks.js where duplicate URL entities were originating from
to begin with. The code there now just creates a new URL if the text
actually changes (since despite the name of the urlChanged method,
that's not the case in some instances, e.g. it's initially called just
for the validation side effects, which should probably be separated out
into a new function).
Allow browsing artists by area in the webservice
Allow browsing places by area in the webservice
Allow browsing labels by area in the webservice
Allow browsing releases by area in the webservice
MBS-7702: Reduce the duplication in link_* macros
MBS-7672, MBS-7673: sort link type/target type dropdowns in relationship editor
MBS-7617: Changing a URL's link type on a series edit page doesn't trigger any validation
MBS-7703: Unused urls in l_series_url are not removed
Remove potentially confusing multiple-assignment statement
Remove unused function link_type_options
MBS-7696: Make buildOptionsTree work for empty trees

The buildOptionsTree function failed with a type error if the root
element had no children, because "children" was treated as an array
without prior checking for definedness.
MBS-7704: Factor out options trees from entities

The various entities that are organized in a tree (having a parent,
children, a child_order) each implemented the relevant fields
themselves, a massive duplication of code.

The common parts are factored out into a parameterized OptionsTree
role, corresponding to the Data role of the same name.

The sorted_children accessor that a few of these entities already had
is made available in all of them, and is extended to use a specific
collator instead of sorting by (lowercased) codepoint order.
MBS-7700: Sort work attribute types alphabetically

In the work edit form, multiple work attribute types and allowed
values to work attribute types with the same child_order value should
be sorted by name, according to the current locale.
MBS-7707: Sort work attributes in the sidebar
Restore class=relationships on relationships heading h2