MDL-37028 Integrity check for course modules and sections

If section mentioned in 'orphaned' module does not exist module is added to the first available section. Also corrected whitespaces