Lifelong Learning using Eigentasks: Task Separation, Skill Acquisition, and Selective Transfer