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

Renaming a directory is only allowed if calling package has write permission to
all files in the given directory tree and all file types in the given directory
tree are supported by the top level directory of new path. Renaming a directory
is split into three steps:
1. Check calling package's permissions for all files in the given directory
tree. Also checK file type support for all files in the new path.
2. Try updating database for all files in the directory.
3. Rename the directory in lower file system. If rename in the lower file system
is successful, commit database update of all files.
Renaming a directory doesn't change the owner package name in the database entry.
Bug: 144279181
Bug: 142475473
Test: atest -c FuseDaemonHostTest#testRenameDirectory
      atest -c FuseDaemonHostTest#testRenameEmptyDirectory
      atest -c FuseDaemonHostTest#testRenameDirectoryNotOwned

Change-Id: Ia2c310892341a20858a94d1e8522052679d08e29
4 files changed