MBS-7074: Do not show current entity in 'relate to' autocomplete

08407e6b3ac92 refactored Autocomplete.js and preserved the idea of a
resultHook, but it was never placed in the options declaration. This
meant the resultHook could only act as identity, but we need to override
it for the "Relate to..." drop down. This commit moves it the options
section so that it can be overriden.
Follow up on 4547945aa by also moving lookupHook to "options" for the same reasons
Merge branch 'beta' into mbs-7074
Show generic 404 page for missing relationship types instead of trying to use a non-existent template (MBS-7169)
Remove recording/work links from the ISRC/ISWC bubbles (MBS-7095)
MBS-7154: Attach CD TOC : some"show tracklist" buttons don't work

The script for toggling the tracklists gets included inside a FOR loop,
so many click handlers get registered for each button. Upon clicking
a button, all of the handlers registered after that specficic row
would get called, having a weird domino effect where the tracklist
would toggle back and forth a huge number of times until it stopped
on "show" or "hide" depending on being odd or even in the list.

This introduces MACROs for the release rows and scripts so that the
templates can include these separately in the markup.

This also fixes a few colspans that cause the barcode column to not
fit into the table.
Reorder cover art: calculate positions differently

On the Reorder Cover Art form, set the values of the hidden input
fields giving the new position in one pass immediately before
submitting.

Previously the values were updated whenever an image was moved, by
swapping the values on the moved image and its neighbour. This was
less clear (in my opinion) and could only cope with simple movements
(one place to the left/right).
Add cover art: determine position differently

On the Add Cover Art page, determine the position where the new images
are to be inserted only when the form is submitted. This has the same
advantages as the corresponding Reorder Cover Art change in the
previous commit.

A small helper function set_position is used because the same code is
needed twice, for the AJAX uploader and the old one.
Simplify Add/Reorder Cover Art code

Get rid of two parameters of reorder_button that (after previous
cleanups) are always null or a no-op function, respectively.
Additionally, merge the image_position function into reorder_position.
MBS-5869: Wrap around when moving cover art
MBS-4374: Reorder cover art via drag'n'drop

Allow cover art to be reordered via drag'n'drop, using the jQuery UI
Sortable component. This also applies to the Add Cover Art page: The
"new image goes here" placeholder can be moved in the same way.
Tweak Add Cover Art image placeholder CSS

The placeholder for the new image on the Add Cover Art page was wider
(and higher) than planned because of its border, displacing it
slightly from the center of its container. Reduce sizes a bit to fix
this.
MBS-7175: Fix condition for detecting missing labels in release editor
Add paging controls for collections (MBS-7115)
Remove leftover unused variable
mbs-7174: change vimeo to autoselect correctly
Compile templates to .ttc files; when DEVELOPMENT_SERVER is not set, check less frequently for changes to template files.
Use a table for the quick links header in the edit search (MBS-5146)
Use a table to display auto-editor election details (MBS-5418)
Replace tabs with spaces for the auto-editor election template