why prophet muhammad migrated to medina