Collapsed Amortized Variational Inference for Switching Nonlinear Dynamical Systems