Residual-based tests for fractional cointegration