MDL-38147 Created class coursecat, added cache definition and lang strings
MDL-38147 Added coursecatlib_test.php, changed other tests to use coursecat::create() for creating category
MDL-38147 deprecated make_categories_list(), change usage to coursecat
MDL-38147 deprecated category_delete_move(), category_delete_full(), change usage to coursecat
MDL-38147 deprecated move_category(), course_category_hide(), course_category_show(), change usage to coursecat

All usages in core replaced with:
- coursecat::change_parent()
- coursecat::hide()
- coursecat::show()
MDL-38147 deprecated get_course_category(), change usage to coursecat
MDL-38147 deprecated create_course_category(), change usage to coursecat. Also avoid direct DB update of table course_categories

changed to usage of
- coursecat::create()
- coursecat::update()
MDL-38147 moved to deprecatedlib.php : make_categories_list()
MDL-38147 moved to deprecatedlib.php : category_delete_move(), category_delete_full()
MDL-38147 moved to deprecatedlib.php : move_category(), course_category_hide(), course_category_show()
MDL-38147 moved to deprecatedlib.php : get_course_category()
MDL-38147 moved to deprecatedlib.php : create_course_category()
MDL-38147 moved to deprecatedlib.php : get_all_subcategories()
MDL-38147 deprecated get_child_categories(), change usage to coursecat
MDL-38147 moved to deprecatedlib.php : get_child_categories()
MDL-38147 deprecated get_categories(), change usage to coursecat
MDL-38147 moved to deprecatedlib.php : get_categories()
MDL-38147 Performance improvements to coursecat class:

- 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()

Also some code improvements:
- rename functions starting with _ , rename arguments, etc.
MDL-38147 Improvements to caching of course categories, coursecat::get_children() improvements

- Course categories caches are purged by event now
- We store only children of one category in one cache key
- Function coursecat::get_children() can return results sorted and/or paginated. Added tests
MDL-38147 Added function coursecat::search_courses(), get_courses()

Also search_courses_count(), get_courses_count();
Added unittests