Added a post-delete action for themes

This would be really useful for themes that focus on posts
Added post-delete handling on themes that should use it.
Rebuild themes when a post or file is deleted...

Rebuild themes when a post or file is deleted in the moderation panel.
Regenerate themes after editing a post
Upload by URL: still use fatal_error_handler() on shutdown
Merge remote-tracking branch 'upstream/master'