[1.7.x] Fixed #23365 -- Added support for timezone-aware datetimes to migrations.

Backport of a407b846b4 from master
[1.7.x] Fixed #23609 -- Fixed IntegrityError that prevented altering a NULL column into a NOT NULL one due to existing rows

Thanks to Simon Charette, Loic Bistuer and Tim Graham for the review.

Backport of f633ba778d from master