Learning When to Restart: Nonstationary Newsvendor from Uncensored to Censored Demand