Skill Reinforcement Learning and Planning for Open-World Long-Horizon Tasks