Average-Reward Learning and Planning with Options