spotify: Reuse artist, album, and track models
spotify: Reuse artist, album, and track models

This adds a module-level cache of artist, album, and track models, whose
content is almost entirely static. This cache is used when we convert from
pyspotify to Mopidy objects.

Previously, an album with 15 tracks would create 15 track objects, 15 artists
objects on the tracks, 15 album objects on the tracks, and 15 artist objects on
the 15 album objects, in total 60 objects. With this change, we only create 15
track objects, 1 album object, and 1 artist object, in total 17 objects.

Measurements with 90 playlists containing about 6500 tracks in total shows that
this reduces the number of Artist objects from 13600 to 3800, and the number of
Album objects from 6500 to 4500 objects.

An unscientific measurement of memory usage using ps(1) indicated a reduction
in RSS from 71MB to 65MB, measured right after the Spotify playlists was loaded
the first time.

glogiotatidis/mopidy,quartz55/mopidy,SuperStarPL/mopidy,diandiankan/mopidy,adamcik/mopidy,swak/mopidy,glogiotatidis/mopidy,woutervanwijk/mopidy,ZenithDK/mopidy,dbrgn/mopidy,mokieyue/mopidy,vrs01/mopidy,bacontext/mopidy,bacontext/mopidy,jodal/mopidy,pacificIT/mopidy,swak/mopidy,jmarsik/mopidy,bencevans/mopidy,vrs01/mopidy,liamw9534/mopidy,diandiankan/mopidy,diandiankan/mopidy,swak/mopidy,mokieyue/mopidy,tkem/mopidy,adamcik/mopidy,jodal/mopidy,ali/mopidy,mopidy/mopidy,ali/mopidy,bacontext/mopidy,liamw9534/mopidy,pacificIT/mopidy,bacontext/mopidy,jmarsik/mopidy,ali/mopidy,woutervanwijk/mopidy,abarisain/mopidy,adamcik/mopidy,SuperStarPL/mopidy,mopidy/mopidy,pacificIT/mopidy,tkem/mopidy,hkariti/mopidy,rawdlite/mopidy,abarisain/mopidy,bencevans/mopidy,kingosticks/mopidy,bencevans/mopidy,ZenithDK/mopidy,quartz55/mopidy,jmarsik/mopidy,rawdlite/mopidy,jodal/mopidy,quartz55/mopidy,quartz55/mopidy,vrs01/mopidy,swak/mopidy,SuperStarPL/mopidy,kingosticks/mopidy,glogiotatidis/mopidy,dbrgn/mopidy,ali/mopidy,SuperStarPL/mopidy,rawdlite/mopidy,priestd09/mopidy,priestd09/mopidy,hkariti/mopidy,jcass77/mopidy,ZenithDK/mopidy,vrs01/mopidy,priestd09/mopidy,hkariti/mopidy,tkem/mopidy,jcass77/mopidy,kingosticks/mopidy,tkem/mopidy,dbrgn/mopidy,rawdlite/mopidy,jmarsik/mopidy,diandiankan/mopidy,bencevans/mopidy,dbrgn/mopidy,mokieyue/mopidy,jcass77/mopidy,ZenithDK/mopidy,hkariti/mopidy,glogiotatidis/mopidy,mokieyue/mopidy,mopidy/mopidy,pacificIT/mopidy