include some tweaks from a former fix for 7844

* refactor pages/trash_controller some
* integration test destroying pages

Conflicts:
	test/integration/page_sidebar_test.rb