Life-long Learning through Task Rehersal and Selective Transfer