MDL-12698, MDL-12569 - componentlib & langimport improvements and fixes; merged from MOODLE_19_STABLE