When Do Skills Help Reinforcement Learning? A Theoretical Analysis of Temporal Abstractions