Identifiability of latent-variable and structural-equation models: from linear to nonlinear