Cache invalidation hook
We now can delete attachments (#1426 (closed)) but we should add a generic cache-invalidation hook because many of us will be using MediaProxy and the file we have deleted will still be accessible until it expires or is pushed out of the cache. If we can make this generic enough we can re-use it if we add more aggressive proxy/cache support in the future.