Rewrite of playlists.

Playlists have been poorly defined for many years, as a combination
of parsed playlist files on disk, combined with "virtual" playlists
which only exist in MediaProvider.  Even worse, once a playlist file
was initially parsed into the database, any future edits in the
database were never reflected in the playlist file, and any future
edits of the playlist file would overwrite the database edits.

For the last few releases, we've been generally converging towards
a strategy where MediaProvider is simply an optimized index of what
exists on disk, and that real files on disk are the authoritative
source of truth.

This change brings that strategy to playlists, where all playlists
are now "real" files on disk, and any mutations are directly
written into these files.  Whenever we detect changes to these
playlist files, we simply reconcile the database playlist members
with whatever we found on disk.

To accomplish this, we split generic playlist modifications away
from the actual persistence logic that understands the various
playlist file formats, and we flesh out both reading and writing
logic for each playlist format.  We also add support for the XSPF
playlist format.

Adds thorough unit tests to verify the behavior of both the generic
playlist mutation logic and the persistence logic, and integration
tests to verify the behavior for typical apps.

Remove "AUDIO_MEDIA_ID_PLAYLISTS" support, since it was a hidden
API that was never officially supported.

Bug: 134683342, 151800650, 148995524, 151209792
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I230aab32bd44ef9d52f3bae6861e7b1f1fa47fee
18 files changed