Protect cache and code_cache directories when deleting account
The package manager stores the inode numbers of the cache
and code_cache
directories so it can clear them later even if the filenames are encrypted due to the device being locked. If we delete those directories then the inode numbers can be reused. This can lead to the app_key
directory being cleared when a new package is installed.
This branch preserves both directories, but clears the contents of the cache
directory in case it contains sensitive information.
Closes #1371 (closed), #1545 (closed)