MDL-33741 Allow user to access files inside courses in hidden categories

If user has permission to manage files inside the course he can access the course even when coursecat is hidden and user can't view hidden categories;
Check 'viewhiddencategories' only for hidden category description
MDL-33741 Check cap viewhiddencategories when requesting a file in cat description