Use functions in AbstractMigration and AbstractSchema

Each migration and schema script will not contain functions
that generate arrays of sql queries. This gives us greater
flexibility and fixes issues with constructors.

This change is backward compatible with old migrations and schema
scripts through default implementations of mentioned functions
which will try to read old variable-based data.
Update code generation for migration classes

Migration classes will now generate functions instead of
variables.
Update code generator for schema files

Schema files will generate function-based code now.
Convert to Unix newlines