Fixed MigrationWriter.serialize() to correctly handle migration
operations by utilizing OperationWriter.
Thanks Piotr Maliński for the report.
Backport of e8e4f978dd from master
get_language() can return None when translations are deactivated.
Thanks Nicola Peduzzi for the reporti and Tim Graham for the review.
Backport of 7a0d9b5cda from master.