19838 protected fk not raising errors on delete

This work is for solving ticket https://code.djangoproject.com/ticket/19838
Includes tests and patch.
Main idea is to add some validation on the inline-formset.