Update database for files renamed by apps that bypass restrictions.

Previously, for apps that bypassed scoped storage restrictions, we
deleted database entry for old path but didn't add new entry for new
path. This left the database in inconsistent state. In the current flow,
we update database entries on rename. App that bypasses scoped storage
restrictions skips all checks while updating database entries.

This doesn't add support for system gallery apps to rename directories
with media/non-media files.

Modified tests to check database updates after rename.

Test:atest FuseDaemonHostTest#testSystemGalleryCanRenameImagesAndVideos
Test atest
FuseDaemonHostTest#testManageExternalStorageCanRenameOtherAppsContents
Test: atest FuseDaemonHostTest
Bug: 150147690

Change-Id: I0472a9547ae3640b985cbafb6fafbe54d8f4f4df
5 files changed