Computational Benefits of Intermediate Rewards for Hierarchical Planning