Optimizing Reusable Knowledge for Continual Learning via Metalearning