Implements the Gregory-Hansen cointegration test. The cointegrating regression is allowed to have a trend or not, and can have either a break in the intercept only or a break in all coefficients. Gregory and Hansen(1996), "Residual-based Tests for Cointegration in Models with Regime Shifts", Journal of Econometrics, vol 70, 99-126. Gregory and Hansen(1996), "Tests for Cointegration in Models with Regime and Trend Shifts," Oxford Bulletin of Economics and Statistics, vol. 58, no 3, pp 555-560.