Learning Reactive and Predictive Differentiable Controllers for Switching Linear Dynamical Models