Spain’s prime minister promised transparency in an investigation into how the trains derailed near Cordoba