3287: Fix FK error of destroying view with systems

Fix the foreign key error that occurs when you try to destroy content views
that have systems by adding a before_destroy hook. Fixes #3287.