[FIX] areas: Empty areas list before updating areas so deleted categories/perspectives get removed from the list plus a few cosmetic fixes.
Thanks marclaporte, hopefully addresses wish4826

git-svn-id: file:///var/local/code.tiki.org/tikisvn/branches/12.x@48194 b456876b-0849-0410-b77d-98878d47e9d5
[FIX] categories: Only check perms etc on $maxRecords of found objects rather than the whole data-set, unless $maxRecords is set to -1.
The category plugin, for instance, was filtering all objects (could be thousands) while only being asked to return 10 items, resulting in up to a minute for some pages to render.

git-svn-id: file:///var/local/code.tiki.org/tikisvn/branches/12.x@48196 b456876b-0849-0410-b77d-98878d47e9d5
[FIX] categories: While asking for 0 maxRecords in browse categories following r48196 was now running really quickly, the counts returned were not reflecting permissions, so revert to using -1 so everything gets fully filtered (but is slow again)

git-svn-id: file:///var/local/code.tiki.org/tikisvn/branches/12.x@48197 b456876b-0849-0410-b77d-98878d47e9d5
[MRG] Automatic merge, branches/12.x 48184 to 48197

git-svn-id: file:///var/local/code.tiki.org/tikisvn/trunk@48198 b456876b-0849-0410-b77d-98878d47e9d5