Set cascading on-delete mappings

Remove all blog posts when a blog is deleted. However, set the
category to NULL when a category is removed.