WL#4762: Turn mysql_alter_table into a more readable code

Affects: Server-9.x   —   Status: Assigned

mysql_alter_table is currently a very long method (more than 2000 lines
of code). It can be made much more readable by introducing subroutines
for the various things done in the mysql_alter_table method.