Closing the Learning-Planning Loop with Predictive State Representations