MDL-45847 resort: Add more course sorting options
Add descending sort options and course timecreated sort options.
Includes behat and unit test changes.
* Implemented a new course and category management page.
* Deprecated the old management interface.
* Unit tests to cover the new API and core functions.
* Behat tests to cover the new interface.
- Course categories caches are purged by event now
- session cache has additional 10 minutes ttl to clear itself and accomodate for permission changes that do not trigger event purging
- additional request-level cache for coursecat::get()
- We store only children of one category in one cache key
- Function coursecat::get_children() can return results sorted and/or paginated. Added tests
- Retrieve and cache only often-used fields of course category
- Removed function coursecat::get_all_visible() as potentially causing performance issues
- removed function coursecat::get_all_parents() as ineffective and unnecessary, replaced with get_parents()
- retrieve all fields from course_categories when unretrieved field is accessed
Also some code improvements:
- rename functions starting with _ , rename arguments, etc.