code: function sortTracks(tracks) {
    var lib = new MusicLibraryIndex();
    tracks.forEach(function(track) {
      lib.addTrack(track);
    });
    lib.rebuildTracks();
    var results = [];
    lib.artistList.forEach(function(artist) {
      artist.albumList.forEach(function(album) {
        album.trackList.forEach(function(track) {
          results.push(track);
        });
      });
    });
    return results;
  }
docs: sort keys according to how they appear in the library