user/index: Add "enrolment details" view to Participants page - MDL-12311
With this patch, the additional roles/groups/groupings columns get moved
to a special "enrolment details" view. To support this, the handling of
the $mode is revamped to use $mode constants.
To keep performance issues at bay, the enrolment details view is only
available when viewing paginated resultsets, and will reset itself to
'brief' if the conditions aren't met. The $mode is sticky, so it is
quite possible to have a mismatched $mode -- so he handle the case
explicitly.