MDL-37455 Performance improvement in mod_folder

We cache and store additional data in cm_info::customdata and do not
query DB every time the folder is displayed on a course page