bfd04df: Dircache: Improve freed name memory recallocation
There's only a need to check every MAX_TINYNAME+1 bytes and that the last character of the needed size 0xff in order to verify the size of the block since the minimum indirectly-stored string is MAX_TINYNAME+1.
05739ef: Avoid having to wait for dircache builds if shut down too soon
When dircache scanning is happening in the background, the user can shut down the device before it is complete. Then, reset_cache() sets size to 0 before it is copied to last_size at the end of build_volumes(). When saved last_size is zero, scanning happens in the foreground during next startup.
Avoid shrinking the size if the build is suspended.
6db8002: Do some housekeeping with fat.h and SECTOR_SIZE
Many includes of fat.h are pointless. Some includes are just for SECTOR_SIZE. Add a file 'firmware/include/fs_defines.h' for that and to define tuneable values that were scattered amongst various headers.
Remove some local definitions of SECTOR_SIZE since they have to be in agreement with the rest of the fs code anyway.
(We'll see what's in fact pointless in a moment ;)