Renamed m4-to-m5.sql -> m4-to-beta1.sql

(Next release will be BETA1, rather than M5.)
Fixed some bugs in the M4->BETA1 schema migration

(These were found after running on a copy of the live data in
production.)