1. Changes to allow different priorities in the theme selection based on
CFG->themeorder setting
2. Changes to allow category themes. Theme can now be set for a category
which will apply to all sub-categories (unless they specifically have a
theme set) and to child courses (course theme and $CFG->themeorder
settings permitting). New config setting $CFG->allowcategorythemes must
be set. Off by default as it means extra database calls.
There is an ugly hack to find out if we are viewing course/category.php -
anyone welcome to tidy this up if they have a better idea.