MDL-81919 core: Move classes out of lib/setuplib.php