Migrate playlists on OS upgrade

1) During the OS upgrade and MediaProvider database migration, we don't
migrate "FORMAT" column which determines MTP format of the file. This
makes ModernMediaScanner#reconcileAndClean() delete all stale rows
unless FORMAT is MtpConstants.FORMAT_ABSTRACT_AV_PLAYLIST.
2) Database migration doesn't migrate audio_playlists_map table, hence
we lose all playlist->audio_files mapping.
3) In Q, playlist files can be only "virtual" playlists which only
exists in MediaProvider database. We changed this logic in R, we force
create "real" playlist files for all playlists. Playlist files are
source of truth in R, and MediaProvider database is updated from
playlist details from playlist files.

All these together causes playlists to be lost after the OS upgrade from
Q to R.

This CL achieves migration of virtual playlist files on OS upgrade with
following steps:
1) Migrate playlist rows with right playlist file names.
2) Create "real" playlist files for virtaul playlists during the
migration and let ModernMediaScanner resolve the playlist and create
audio_playlists_map entries.

Also adds tests for verifying playlist files are migrated on
LegacyMigration.

Bug: 165904660
Test: LegacyProviderMigrationTest#testLegacy_PlaylistMap
Change-Id: Ib96e63bf33a27679465b05c8baa4acf7cc4977b2
diff --git a/Android.bp b/Android.bp
index e1ac31d..1039d55 100644
--- a/Android.bp
+++ b/Android.bp
@@ -83,6 +83,7 @@
         "src/com/android/providers/media/util/HandlerExecutor.java",
         "src/com/android/providers/media/util/Logging.java",
         "src/com/android/providers/media/util/MimeUtils.java",
+        "src/com/android/providers/media/playlist/*.java",
     ],
 }