Sobolev orthogonal Legendre rational spectral methods for problems on the half line