LUN-792 Improved version of CMSMenu. Itermediate work
LUN-792 More improvements: reduce the number of title queries

* also fix most of the unit tests (some are still failing)
Refactored get_visible_pages method to query permissions with values_list
Improved pagepermission query + changes based on code review
Removed unused import
Merge branch 'menu_performance' into support/2.3.x