An Optimal Control Approach to Sequential Machine Teaching