FUSE rename: Check file type and write permission for renaming file.

On FUSE rename file, check if the calling app has write permissions for old
and new path of the file to be renamed. Also, check if the new file type
is supported by new path's top level directory.
After renaming the file in lower file system, MediaProvider database entry is
updated with new path. Renaming a file doesn't change the owner  package
name in the database entry.
Bug: 144279181
Bug: 142475473
Test: atest -c FuseDaemonHostTest#testRenameFile
      atest -c FuseDaemonHostTest#testRenameFileType
      atest -c FuseDaemonHostTest#testRenameFileNotOwned

Change-Id: Ib8ba8a9e80030537403fa7909c017c469d5ff51f
4 files changed