Added migration for site test app depending on contrib.sites
Replaced DatabaseCreation sql methods by schema editor equivalents

Also used schema editor in migrate to sync unmigrated apps (sync_apps).
Refs #22340. Thanks Tim Graham for the review.