Fuse rename: Enforce restrictions based on target SDK.

Legacy app with WRITE_EXTERNAL_STORAGE permission will bypass rename
restrictions imposed by MediaProvider.
Legacy app with only READ_EXTERNAL_STORAGE or with no storage permission
can only rename files and directories in external app directories.
Bug: 144990065
Test: atest -c LegacyAccessHostTest#testCanRename_hasW
      atest -c LegacyAccessHostTest#testCantRename_hasR
      atest -c LegacyAccessHostTest#testCantRename_noStoragePermission

Change-Id: I17d295664412433c144b00641171b595e69204fc
3 files changed