Adds specs for pages controller order action.
Implemented a faster page sorting for language trees
Adds specs for sorting trees with invisible, restricted and external pages.
Fixes url processing of trees having invisible pages.
Ensures that page#redirects_to_external? always returns a boolean value.

This prevents the page tree json object of having blank values for external attribute.