Improve removal of a page type

This pull request improves the removal of a page type: when it's used
by some page, these pages are assigned to an other page type
(specified by the user) so the removal can be accomplished.