MDL-59159 upgrade: clean < 3.1.0 upgrade steps
LTS (3.5) requires previous LTS (3.1) This just deletes all the upgrade steps previous to 3.1.0. Some small adjustments, like adding missing MOODLE_INTERNAL or tweaking globals can also be applied when needed. Also includes an upgrade step to prevent upgrading from any version < 2016052300 (v3.1.0) as anti-cheating measure. Next commit will get rid of/deprecate all the upgradelib functions not used anymore in codebase.