CMS_PERMISSION: optionally use raw id user lookups

The "view restrictions" and "page permissions" inlines on the "page"
admin change forms can cause performance problems where there are many
thousands of users being put into simple select boxes. Added a new
setting (CMS_RAW_ID_USERS) that, if set, forces the inlines on that page
to use standard Django admin "raw ID" lookups rather than select boxes.
The restriction on which users may be selected should still be honoured
by the new widget because we set the 'limit_choices_to' attribute to be
the same as the queryset on the original widget.

Using raw_id_fields in combination with limit_choices_to blows up if you
have many thousands of users. For this reason, we only apply this limit
if the number of users is relatively small (< 500, though that figure is
somewhat arbitrary). If the number of users we need to limit to is
greater than that, we use the usual input field instead unless the user
is a CMS superuser, in which case we bypass the limit. Unfortunately,
this means that non-superusers won't see any benefit from this change.
Removed unused import
.count() rather than len() for performance boost
CMS_RAW_ID_USERS: added default setting + docs

Also removed the previous version bump so it can merge cleanly upstream.
clearer conditional check
Merge branch 'develop' into raw_id_users

Conflicts:
	cms/conf/global_settings.py
Only use raw ID above a certain number of users

So the RAW_ID_USERS setting should now be either left as False or set to
a positive integer which will be the threshold for the number of users
above which the raw ID widget will be used.
import typo
Switch from __getattribute__ to classproperty

Added the new classproperty helper in cms.utils.helpers.
changelog missing moderator removal
cookie middleware added
tutorial changes
permission fixes and other test fixes
fixes testsuite
cleanup
only sets cookie if changed or not there
fix mysql datetime fuck up
Adds (removes) class 'cms_toolbar' to HTML when CMS Toolbar is shown (hidden)

This allows CSS designers to expand collapsed sections of the page as appropriate for using the on-screen CMS controls.

Also, added radix parameter to Math.parseInt() usage.
Adds class 'cms_toolbar-switcher' when the edit switch is ON

Aides page CSS designers to best present the page for editing.
Merge pull request #1704 from digi604/cookie-middleware

language cookie middleware added