coursecat: smarter caching and retrieving
Added coursecatlib_test.php, changed other tests to use coursecat::create() for creating category
deprecated make_categories_list(), change usage to coursecat
deprecated category_delete_move(), category_delete_full(), change usage to coursecat
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()
deprecated get_course_category(), change usage to coursecat
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()
moved to deprecatedlib.php : make_categories_list()
moved to deprecatedlib.php : category_delete_move(), category_delete_full()
moved to deprecatedlib.php : move_category(), course_category_hide(), course_category_show()
moved to deprecatedlib.php : get_course_category()
moved to deprecatedlib.php : create_course_category()
moved to deprecatedlib.php : get_all_subcategories()
deprecated get_child_categories(), change usage to coursecat
moved to deprecatedlib.php : get_child_categories()
deprecated get_categories(), change usage to coursecat
moved to deprecatedlib.php : get_categories()
coursecat: Attempt to use session cache
Revert "coursecat: Attempt to use session cache"

This reverts commit db8596bc52a572e33203a85114204af3b88db343.