MBS-6395, fix medium_index table.

The 2013-05-15 schema change release did not call
DurationLookup->update() in all places it should have.  Additionally a
bug was present in DurationLookup->update which prevented medium_index
rows from being deleted when they should have been.

This script fixes all those rows which could have been affected by
these bugs.
MBS-6395, add shell script to loop over update-medium-index.pl until all work is done.
MBS-6395, discs where not all tracks have a length should not have an entry in medium_index.

Incorrectly assumed sum(track.length) would be falsy if one ore more
tracks would have a NULL length.
MBS-6027, only include "asin" for toplevel release serializations.

... and change json /discid/ requests to return toplevel releases like the
xml serialization does.
MBS-5958, patch track.position for all tracks before saving.
MBS-5958, also add an updateTrackNumbers call to resetTrackNumbers.
Merge branch 'mbs-6027' into mbs-5903

* mbs-6027:
  MBS-6027, only include "asin" for toplevel release serializations.
MBS-5903, include releases in collection/:mbid/releases json response.
MBS-5903, include tests.
MBS-6416, Do not try to initialize Track->new with an empty string or undef as an identifier.
Revert "Revert "MBS-6416, keep track of track row ids when editing a medium.""

This reverts commit c453e4395f53f184496d8a40522a823533576b33.
Merge branch 'mbs-6416' into mbs-6416-revert-revert

* mbs-6416:
  MBS-6416, Do not try to initialize Track->new with an empty string or undef as an identifier.
MBS-6315, load recording associations from the recordings form, not the tracklist form.
MBS-6374, convert schema 16 style country/date pairs seeded to the release editor to schema 18 events.
MBS-6261, rener release events in separate date and country columns in release list.
MBS-6261, do not render "date unknown" in date/country pairs with unknown dates.
Revert "MBS-6261, do not render "date unknown" in date/country pairs with unknown dates."

This reverts commit 2d48cc950313c021ee9704723ead7dd30a3f0c4f.
MBS-6261, change remaining "Release Events" columns to seperate date/country columns.
Merge branch 'mbs-6395-fix-medium-index' into beta

* mbs-6395-fix-medium-index:
  MBS-6395, discs where not all tracks have a length should not have an entry in medium_index.
  MBS-6395, add shell script to loop over update-medium-index.pl until all work is done.
  MBS-6395, fix medium_index table.
Merge branch 'mbs-6416-revert-revert' into beta

* mbs-6416-revert-revert:
  Revert "Revert "MBS-6416, keep track of track row ids when editing a medium.""
  MBS-6416, Do not try to initialize Track->new with an empty string or undef as an identifier.