Regime-switching autoregressive coefficients and the asymptotics for unit root tests