Music streaming service Spotify has reached a deal with music labels for less royalty rates, clearing the way for an IPO.