CAREER: A Closed-Loop Control Framework for the Treatment of Chronic Stroke