Thumbnail lifecycle: reuse thumbs from identical files, delete thumbs when diskfile is deleted
These patches improve thumbnail handling in two aspects:
- By changing the naming scheme for thumbnails to not use the attachment ID anymore, already generated thumbnails for identical attachments will be reused.
- The second patch adds code to remove any thumbnails when the original attachment file is deleted from disk. Without this patch, thumbnails of deleted attachments are never deleted.