Algebraic invariant curves and first integrals for Riccati polynomial differential systems