Bayesian Markov switching tensor regression for time-varying networks