added Page.check exceptions for all parent classes

`Page.check` must be aware of all foreign keys which point
to parent classes. These keys are allowed to cascade on delete.

This is a solution to issue #792 
Sorry the previous pull request had a really ugly case of autoformatting gone too far.