Long memory and nonlinearities in realized volatility: A Markov switching approach