Memory-Efficient Learning of Stable Linear Dynamical Systems for Prediction and Control