Reionization and the Cosmic Dawn with the Square Kilometre Array