Optimal Policies for Observing Time Series and Related Restless Bandit Problems