Efficient algorithms for computing rational first integrals and Darboux polynomials of planar polynomial vector fields