Extracted code from sync_users() into separate functions
in order to enable ad-hoc sheduling, and chunking.
Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
Sheduled tasks for syncing users with external sources for auth_ldap
and auth_cas. Using task is simplier than setting separate cron
job for running cli script. Task are disabled by default.