changes to coursecatlib - not search/get related
MDL-38147 Added function coursecat::search_courses(), get_courses()

Also search_courses_count(), get_courses_count();
Added unittests
changes to lib/db/caches.php