Optimize page permissions checking on Django CMS 3.0

Hi,

This is a forward port of #2756 on Django CMS 3.0 as requested by @digi604.