Dynamics of a stochastic nutrient–plankton model with regime switching